HackerOne SAML signup domain enforcement bypass results in unauthorized access to HackerOne PullRequest organization
The signup endpoint's SAML domain enforcement could be bypassed by appending control characters to the email address, allowing registration with an email domain that should have been redirected to SSO. An attacker could then create an account using a HackerOne email address and, if the legitimate owner clicked the verification email, gain access to the PullRequest organisation and its source code.
Originally disclosed on HackerOne
- Triaged in 4 hours
- Fixed in 30 hours
- Paid in 23 days
- Disclosed after 6 months
Summary:
SAML signup domain enforcement for new signups that belong to a SAML-enabled organization can be bypassed with trailing control characters. While the described issue affects all organizations with this feature enabled, it's possible to leverage it to access the PullRequest HackerOne organization, giving a real attacker access to HackerOne source code in Pull Requests.
Description:
When signing up on hackerone.com, email domains enforced by HackerOne SSO are not allowed for regular registration. The request to /POST users returns a redirect to the SSO provider:
POST /users HTTP/1.1
Host: hackerone.com
...
user%5Bname%5D=[NAME]&user%5Busername%5D=[USERNAME]&user%5Bemail%5D=email%40example.com&user%5Bpassword%5D=[PASSWORD]&user%5Bpassword_confirmation%5D=[PASSWORD]
{"redirect_path":"/users/saml/sign_in?email=email%40example.com"}
However, adding a %0d%0a in the end of the email param will make the request go through:
POST /users HTTP/1.1
Host: hackerone.com
...
user%5Bname%5D=[NAME]&user%5Busername%5D=[USERNAME]&user%5Bemail%5D=email%40example.com%0d%0a&user%5Bpassword%5D=[PASSWORD]&user%5Bpassword_confirmation%5D=[PASSWORD]
{"redirect_path":"/users/sign_in","errors":{}}
Then, logging in with the actual email [email protected] will work, but email verification is then enforced. Accessing the account will work if the email owner clicks on the HackerOne standard verification email sometime in the future.
Since hackerone.com is a domain part of a SAML-enabled organization itself, if an attacker creates multiple accounts that will send legitimate verification emails to @hackerone.com users and one clicks it, accessing PullRequest via Sign in with HackerOne on https://app.pullrequest.com/login, will then allow source code access.
The following steps were followed along with @jobert to create a [email protected] account that will then allow access to PullRequest:

Steps To Reproduce
- Go to https://hackerone.com
- Signup as the attacker with a
@hackerone.comemail you control, e.g.[email protected]or[email protected], notice that this will redirect you to the SSO login - Try to signup again and intercept the request to
POST /usersand add the%0d%0ain the end of the email parameter - As the victim, click the confirmation email in a separate session
- As the attacker on the original session, log in with the password you chose for the account
- Go to https://app.pullrequest.com/login and click
Sign in with HackerOne - You'll have access to all pull requests of HackerOne infrastructure codebase, including source code access
Impact
An attacker can bypass the signup SAML enforcement for any organization on HackerOne, including HackerOne organization itself which leads to source code access. Verifying the email is the only interaction step, but an actual attack could be feasible.
On the other hand, when SAML accounts are provisioned for any organization, the previous sessions are revoked, but not API keys. So an attacker who can pre-stage an account on HackerOne and generate API keys will keep backdoor access to the account until the API keys are rotated explicitly by the victim, which could mean forever for specific accounts that will never rotate the API keys.
Suggested mitigations
- Correctly strip and normalize the email address that is being processed in the signup endpoint to check if SAML is enforced
- Don't give access to anyone with an
@hackerone.comemail address to PullRequest without manual approval or account flags
Notes:
- No source code was stored locally while performing this testing
- The accounts created while testing were
[email protected]and[email protected] - The
[email protected]was created around 18 months ago - I didn't realize any impact until now after showing this behavior to @jobert during h1-702-2023
Attachments

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the signup endpoint checked the raw email string for SAML enforcement without stripping or normalising trailing control characters, so the domain check saw a different value than the one stored for the account.
Impact
An attacker could bypass SAML signup enforcement for any organisation on HackerOne, and if a victim clicked the verification email, could gain source code access through PullRequest; the report notes that email verification is the only interaction step and that an actual attack could be feasible.
What the attacker needed
A HackerOne email address the attacker controls; victim clicks the verification email; attacker intercepts the signup request
How it was found
- Go to the HackerOne website and try to sign up with a HackerOne email address, noting the redirect to SSO.
- Intercept the signup request and append control characters to the email parameter.
- As the victim, click the confirmation email in a separate session.
- As the attacker, log in with the chosen password on the original session.
- Go to the PullRequest login page and choose sign in with HackerOne.
- Access the pull requests and source code of the HackerOne organisation.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a company uses single sign-on (SSO), it normally blocks people from creating a normal password account with a company email address. This report shows that adding invisible control characters to the end of the email address tricked the signup form into allowing the account anyway. If the real owner of that email address later clicked a verification link, the attacker's account became usable and could be used to log in to a connected service.
What is Access control?
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.