Control Characters Not Stripped From Username on Signup
The signup form did not strip control characters from usernames, so a username followed by a newline character was accepted even though it matched an existing username. This caused the new account's profile page to return a 404 and made submitted bug reports appear to come from the other user.
- Triaged in 6 hours
- Fixed in 6 days
- Paid in 6 days
- Disclosed after 7 days
Hey,
To be honest, I'm not sure if there is any real security implications of this bug, but it's (IMO) something which should be fixed at some point (since it'll be pretty easy).
On signup, the username you chose has to be alphanumeric. If you submit someone else's username, followed by a null-byte (%00), you'll get an error indicating that the username has been taken (expected behaviour). Same with %20. However, if you submit the username followed by a control character, such as a new line (%0a), the request will go through and you'll be signed up.
There are a couple of consequences of this. The first is that your profile can't be viewed (which also means you can't update your own settings!). You'll get a 404.
The second is that any bug reports you submit will look like another user submitted them. Again, not that big of a deal.
Proof-of-Concept
- Browse to https://hackerone.com/users/sign_up
- Enter any details, make sure your username is followed by
%0a(use Burp to append it) - Confirm your email, then login
- Click your profile picture in the top right
- You'll get a 404
If you need anymore information just shout, Cheers, Jack
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
Impact
The new account's profile page could not be viewed (returning a 404), preventing the user from updating their own settings, and any bug reports submitted by that account appeared to have been submitted by the other user.
What the attacker needed
A free account; ability to intercept and modify signup request
The fix
The signup form should be fixed to handle control characters such as newlines in usernames.
How it was found
- Browse to the signup page.
- Enter any details, making sure the username is followed by a newline character (using an intercepting proxy to append it).
- Confirm your email, then log in.
- Click your profile picture in the top right.
- Observe that the profile page returns a 404.
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 you create an account, the site checks that your username is not already taken. It correctly rejected names with a null byte or space at the end, but it forgot to reject a newline character. That let someone register a name that looked identical to another person's name, which broke their profile page and made their reports look like they were written by the other person.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.