CSRF in adding phrase.
The phrase-adding endpoint on the translation platform accepted a POST request without a valid CSRF token, even though the form normally includes one. An attacker could craft a page that submits the request on behalf of a logged-in user, adding phrases to their account without consent.
Originally disclosed on HackerOne
- Fixed in 16 hours
- Disclosed after 20 hours
CSRF is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. With a little help of social engineering (like sending a link via email/chat), an attacker may trick the users of a web application into executing actions of the attacker's choosing.
CSRF HTML Code:
<html> <body> <form action="http://www.localize.io/add_phrase/59/languages/3" method="POST"> <input type="hidden" name="add_phrase[type]" value="1" /> <input type="hidden" name="add_phrase[key]" value="asdasd" /> <input type="hidden" name="add_phrase[string]" value="456" /> <input type="submit" value="Submit request" /> </form> </body> </html>in fact there is a CSRF Token in the form, but i remove that, and i try to submit the request, and it works perfectly. name="CSRFToken"
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 server did not validate the CSRF token on the add-phrase endpoint, so requests without it were still accepted.
Impact
An attacker could trick a logged-in user into adding phrases to their account, a low-impact integrity change limited to that action.
What the attacker needed
Victim is logged in; victim visits attacker page
The fix
The endpoint should validate the CSRF token that the form normally includes.
How it was found
- Open the add-phrase form while logged in and note the request it sends.
- Build a page with a form that posts the same fields to the add-phrase URL, leaving out the CSRF token.
- Submit the forged request and observe that the phrase is added.
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 are logged into a website, your browser automatically sends your session cookie with every request to that site. A cross-site request forgery (CSRF) attack is a trick page that makes your browser send a request the site trusts, because it comes with your cookie. Here the site was supposed to check a secret token in the form to prove the request came from its own pages, but it did not, so a forged request went through.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.