Skip to content
Access control Write-up Intermediate

Accessing GoDaddy internal instance through an email logic bug.

The application's sponsor email verification could be bypassed by supplying multiple recipient addresses and setting an internal-user flag, allowing the attacker to approve their own external email. The attacker then changed the role identifier in the approval request to gain full administrator access to the internal instance.

Mostafa Mamdoh Follow

Published on systemweakness.com

System Weakness

Mostafa Mamdoh, on systemweakness.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

This write-up describes a logic bug found in a GoDaddy internal management instance. The researcher refers to the affected subdomain only as redacted.redacted. The instance is an internal management application that requires authentication through SSO via OKTA or through Google OAuth for accounts that are already authorised. For a first-time user, the application offers a registration path that requires a Sponsor @Godaddy.com employee to authorise the account. The bug allowed the researcher to add himself as an administrator of the whole web application instance.

Setup

The work started as a search for CVE-2021-44228 (Log4j). The researcher used the Log4j-Scanner tool, which relies on SubFinder, AssetFinder, Amass to gather domains and subdomains for the target. After collecting the subdomains, the researcher tested valid parameters manually on each listed subdomain, and that is how redacted.redacted was found. Burp was used to intercept and modify the registration request. No specific versions of the scanner or of the target application are given.

Finding it

On first look the instance was an internal management application protected by SSO through OKTA or Google OAuth for already authorised accounts. A new user could register only if a Sponsor with a @godaddy.com address authorised the account.

The researcher first tried to add an email that does not end with @godaddy.com in the Sponsor field. That did not work: the application returned an error. He then entered [redacted] and launched Burp to intercept the request.

Exploitation

Step 1: Try to bypass the sponsor email check

With the request intercepted, the researcher tried different methods:

  1. Adding [redacted]*
  2. Adding two mails in the same field, separated by a comma , (multiple recipients)

Neither worked on the first attempt.

Step 2: Repeat with InternalUser set to True

He repeated the same methods, but this time changed InternalUser to True. With the first method the application returned an error indicating the email must be at @godaddy.com. The second method, multiple recipients, sent an email.

Using the multiple recipients method, the application sent the same approval email for both [redacted] and [redacted], and that email allowed approval of his own address [redacted].

Step 3: Approve the account and escalate the role

He opened the approval URL. It allowed him to approve the account only with a low privilege role (Low permission role). He intercepted that request, which was simple, and changed the role id from 6 to 1. After sending the modified request he obtained full administrator permission on the instance.

Root cause

The application verified the multiple emails trick but failed to verify it when the InternalUser parameter was enabled. In other words, the sponsor email validation behaved differently depending on the value of InternalUser, and the multiple recipients form of the field slipped past the check that was supposed to require a @godaddy.com sponsor. The approval request carried a role id, and changing it from 6 to 1 produced full administrator permission. The report does not describe the server-side code, so the exact implementation is not shown.

Impact

In the researcher's attempt, naming his own address alongside a @godaddy.com address with InternalUser set to True produced an approval email for his own address, and changing the role id in the approval request gave full administrator permission on the instance. The report does not state how many users or which data would be exposed beyond the administrator access to the instance.

Fix

The report states that the bug was fixed on December 17, 2021, three days after it was reported on December 14, 2021. No bounty had been awarded at the time of writing.

Variants to test

  1. Sponsor or referral fields that accept an email address: try two addresses separated by a comma, with one internal and one external, and watch for an approval email arriving at the external address.
  2. Boolean flags such as InternalUser in registration requests: repeat the same payload with the flag set to True and compare validation errors and emails sent.
  3. Role or permission identifiers in approval requests: approve with the lowest role, intercept the request, and change the id to the highest value to see what role the server grants.
  4. Domain suffix tricks such as [redacted]* in fields that validate against a domain: a positive result is the application accepting the value or sending an approval email.

A positive result in any of these is an approval email reaching an address the attacker controls, or a role change that the server accepts without an independent authorisation check.

Timeline

  • December 14, 2021: bug reported
  • December 17, 2021: bug fixed
  • No bounty awarded at the time of writing

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A security researcher found a way to give himself full administrator access to an internal GoDaddy web application. He did not break any encryption or guess a password. Instead he found a mistake in the logic of the registration form: the application was supposed to let a new person register only if a real GoDaddy employee (called a "Sponsor") approved them, but a small trick with the email field and a hidden setting called InternalUser let him approve his own personal email address. Once he had an account, a second mistake let him change his own permission level from the lowest one to the highest one.

This article explains the whole story for someone who has never done security testing. Every technical word is explained the first time it appears, and there is a glossary at the end.

Some background ideas first

Before the story, a few concepts that come up again and again.

  • A web application is a website that does more than show pages: you log in, fill in forms, and it stores and changes data for you. An internal management application is one meant for a company's own staff, not for the public, but it still lives on the internet at some address.
  • A subdomain is a name that sits in front of a company's main domain. If the main domain is example.com, then admin.example.com and shop.example.com are subdomains. Companies often have many, and some are forgotten or less protected than the main site.
  • A request is the message your browser sends to a server when you click a button or submit a form. It contains the address you are asking for, some settings (called headers), and often the data you typed. The server replies with a response, which is the page or the error message you see.
  • Intercepting a request means catching that message on its way out of your browser so you can read it, change it, and then send it on. A common tool for this is Burp (Burp Suite). Think of it as a postal worker who lets you open, rewrite and reseal a letter before delivering it.
  • A parameter is one named piece of data inside a request, for example InternalUser=True. Each parameter has a name and a value, like a field on a paper form.
  • SSO (Single Sign-On) is a login system where one account works across many applications. You sign in once with, say, your company account and other sites trust that sign-in.
  • OKTA is a company that provides such sign-in services. Google OAuth is Google's version: a site can let you log in with your Google account instead of creating a new password.
  • A logic bug (also called a logic flaw) is a mistake not in the code's grammar but in its reasoning. The program runs fine, but it checks the wrong thing, or checks it in the wrong order, or trusts a value it should not trust. A everyday comparison: a bouncer who checks that you hold a ticket but never checks whether the ticket is for tonight's concert.
  • Privilege escalation means getting a higher level of permission than you were given. Account takeover means getting control of an account that is not yours. Both are named as the weakness in this report.
  • CVE-2021-44228 is a public identifier for a very widely known security flaw in a piece of software called Log4j. Researchers scan the internet looking for systems that still have it. That scan is how this whole story started, even though the actual bug found was something else entirely.

How the researcher found the target

The work began as a hunt for CVE-2021-44228 (the Log4j flaw). To find candidate systems, the researcher used a tool called Log4j-Scanner. That tool uses three other tools, SubFinder, AssetFinder, Amass, whose job is to collect as many domains and subdomains belonging to a target as possible. In other words, the scanner first builds a long list of addresses that might belong to GoDaddy, then probes them.

After the list was built, the researcher went through the listed subdomains one by one and tested valid parameters manually. That manual pass is how he came across the subdomain he calls redacted.redacted. He hides the real name in the write-up.

He then used Burp to intercept and modify the registration request. The report does not give versions of the scanner or of the application.

What the application looked like

On first look, the instance was an internal management application. To get in, you had to log in either through SSO via OKTA or through Google OAuth, and only if your account was already authorised. So the front door was locked for outsiders.

There was, however, a side door for first-time users: a registration path. To use it, you needed a Sponsor @Godaddy.com employee, that is, a real GoDaddy staff member whose GoDaddy email address you put in the form, and that person had to authorise your account. The idea is simple: if a trusted employee vouches for you, you may come in.

The first attempt: a non-GoDaddy sponsor email

The researcher first tried to put an email address that does not end with @godaddy.com into the Sponsor field. The application refused and returned an error. That is the expected behaviour: the sponsor must be a GoDaddy employee.

He then entered [redacted] in the field and launched Burp so that the request carrying that value would be caught and could be edited before it reached the server.

Step 1: trying to slip past the sponsor check

With the request intercepted, he tried different methods:

  1. Adding [redacted]*
  2. Adding two mails in the same field, separated by a comma , (multiple recipients)

Neither worked on the first attempt.

Why these two ideas? The first is a domain suffix trick. A naive check might only ask "does the text contain @godaddy.com?" and say yes, even though the real domain in that string is something else entirely. The second is a multiple recipients trick: many email fields accept a list separated by commas, and a naive check might look only at the first address, or only at the last, while the mail system sends to all of them.

Neither trick got past the check as things stood.

Step 2: the same tricks, with InternalUser set to True

He repeated the same methods, but this time changed InternalUser to True in the request. InternalUser is a parameter, a named value in the request, and it looks like a flag that tells the application whether the person registering is an internal (staff) user or an external one.

With the first method, the application returned an error indicating the email must be at @godaddy.com. So the suffix trick was still rejected.

The second method, multiple recipients, sent an email.

Using the multiple recipients method, the application sent the same approval email for both [redacted] and [redacted], and that email allowed approval of his own address [redacted].

In plain words: he put his own personal Gmail address and a GoDaddy address in the same field, separated by a comma. The application sent the same approval email to both addresses, including his own personal Gmail address. The approval email that landed in his own inbox let him approve his own account. The person who was supposed to vouch for him never had to do anything.

Step 3: from low privilege to administrator

He opened the approval URL from the email. It let him approve the account, but only with a low privilege role, marked in the report as Low permission role. A role is a named bundle of permissions: what you are allowed to see and do. A low role can do little; an administrator role can do everything.

He intercepted that approval request. It was simple, and he changed the role id from 6 to 1. A role id is the number the application uses internally to identify which role you get. Sending 6 means "give this person the low role"; sending 1 apparently means "give this person the top role".

After sending the modified request, he obtained full administrator permission on the instance.

The important point is that the server accepted the changed role id, so the approval request he sent determined the role he received.

Why it worked

The application verified the multiple emails trick, but failed to verify it when the InternalUser parameter was enabled. In other words, the sponsor email validation behaved differently depending on the value of InternalUser, and the multiple recipients form of the field slipped past the check that was supposed to require a @godaddy.com sponsor. The approval step then trusted a role identifier supplied in the request, so a low privilege role could be swapped for an administrator role. The report does not describe the server-side code, so the exact implementation is not shown.

What the impact was

In the researcher's attempt, naming his own address alongside a @godaddy.com address with InternalUser set to True produced an approval email for his own address, and changing the role id in the approval request gave full administrator permission on the instance.

How it was fixed

The report states that the bug was fixed on December 17, 2021, three days after it was reported on December 14, 2021. No bounty had been awarded at the time of writing.

Things worth trying elsewhere

These are general patterns to test on other applications, taken from the same lessons:

  1. Sponsor or referral fields that accept an email address: try two addresses separated by a comma, with one internal and one external, and watch for an approval email arriving at the external address.
  2. Boolean flags such as InternalUser in registration requests: repeat the same payload with the flag set to True and compare validation errors and emails sent.
  3. Role or permission identifiers in approval requests: approve with the lowest role, intercept the request, and change the id to the highest value to see what role the server grants.
  4. Domain suffix tricks such as [redacted]* in fields that validate against a domain: a positive result is the application accepting the value or sending an approval email.

A positive result in any of these is an approval email reaching an address the attacker controls, or a role change that the server accepts without an independent authorisation check.

Timeline

  • December 14, 2021: bug reported
  • December 17, 2021: bug fixed
  • No bounty awarded at the time of writing

Glossary

  • Web application: a website that lets you log in, submit forms and store or change data, rather than only displaying pages.
  • Subdomain: a name in front of a company's main domain, such as admin.example.com for example.com.
  • Request: the message a browser sends to a server when you load a page or submit a form.
  • Response: the server's reply to a request, such as a page or an error message.
  • Header: a setting sent along with a request or response, separate from the visible content.
  • Parameter: one named piece of data in a request, with a name and a value, such as InternalUser=True.
  • Intercept: to catch a request on its way out of the browser so it can be read or changed before it is sent.
  • Burp (Burp Suite): a tool used to intercept, inspect and modify requests between a browser and a server.
  • SSO (Single Sign-On): a login system where one account works across many applications.
  • OKTA: a company providing single sign-on and identity services.
  • Google OAuth: Google's system that lets a site log you in with your Google account.
  • Sponsor: in this application, a GoDaddy employee whose address is entered to authorise a new account.
  • Logic bug (logic flaw): a mistake in the reasoning of a program, where it runs but checks the wrong thing or trusts the wrong value.
  • Privilege escalation: obtaining a higher level of permission than you were given.
  • Account takeover: gaining control of an account that belongs to someone else.
  • CVE-2021-44228: the public identifier for a widely known flaw in the Log4j software.
  • Log4j: a logging library used by many Java applications; the flaw above was in it.
  • Scanner: a tool that automatically probes many addresses or systems looking for a particular condition.
  • SubFinder, AssetFinder, Amass: tools that collect domains and subdomains belonging to a target.
  • Domain suffix trick: putting a trusted domain name inside a value so a naive check passes, for example [redacted]*.
  • Multiple recipients trick: putting two email addresses in one field separated by a comma, hoping the check looks at only one of them.
  • Boolean flag: a parameter that is either true or false, such as InternalUser.
  • Role: a named bundle of permissions that decides what an account may do.
  • Role id: the number the application uses to identify a role, such as 6 for a low role or 1 for an administrator role.
  • Administrator: an account with the highest level of permission in an application.
  • Payload: the data you send in a request, especially when it is crafted to test or exploit something.
  • Bounty: a reward a company pays a researcher for reporting a security bug.

More by Mostafa Mamdoh

View all

4 more disclosed reports, best first.

More from GoDaddy

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.