Full Path Disclosure
The application unserialises user-supplied data from the review[phraseObject] parameter without proper validation, causing a PHP notice that reveals the full server file path. An attacker could use this path information to plan further attacks.
Originally disclosed on HackerOne
- Triaged in 17 hours
- Fixed in 20 hours
- Disclosed after 24 hours
Not my best piece of work, but the following file results in a full path disclosure if review[phraseobject] is given the wrong parameter.
http://www.localize.io/review/3C/languages/5 POST
CSRFToken=Njg0ODMwOTM1MzUwYzk5ZTFiOWU3OC4zMDk0MzM1NQ%3D%3D&review%5BeditID%5D=cw3&review%5BreferenceValue%5D=test&review%5BphraseObject%5D=TzoyMToiUGhyYXNlX0FuZHJvaWRfU3RyaW5nIjo2OntzOjg6IgAqAHZhbHVlIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaajtzOjQ6InRlc3QiO3M6NToiACoAaWQiO2k6MDtzOjEyOiIAKgBwaHJhc2VLZXkiO3M6NzoidGVzdGluZyI7czoxMDoiACoAZ3JvdXBJRCI7aTowO3M6MjQ6IgAqAGVuYWJsZWRGb3JUcmFuc2xhdGlvbiI7YjoxO3M6MTA6IgAqAGlzRW1wdHkiO2I6MDt9&review%5BphraseKey%5D=testing&review%5BphraseSubKey%5D=0&review%5BcontributorID%5D=sh&review%5BnewValue%5D=1&review%5Baction%5D=approve
Notice: unserialize(): Error at offset 133 of 192 bytes in /var/www/vhosts/lvps178-77-99-228.dedicated.hosteurope.de/httpdocs_localize/index.php on line 244
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 application passes user-controlled input directly to PHP's unserialize() function without validating or sanitising it, and error messages are displayed to the user.
Impact
An attacker could learn the full server file path, which may aid in further attacks such as path traversal or local file inclusion, though the report does not demonstrate such exploitation.
What the attacker needed
Ability to send POST requests to the endpoint
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 program tries to turn a text string back into a data structure (a process called unserialising), it can fail if the string is malformed. Here, the failure caused an error message that included the server's internal file path, which is normally hidden. That path could help an attacker find other files or plan more serious attacks.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.