Full path + some back-end code disclosure
When an admin edits their profile, changing the avatar filename parameter to a path traversal value causes an exception that discloses the full server path and some back-end source code. The reporter did not demonstrate reading an arbitrary file, only the error output.
- Triaged in 3 hours
- Fixed in 22 hours
- Disclosed after 34 days
Hello,
Ironically enough, I just discovered a full path disclosure issue. When an admin edits their personal information, a request like the following gets sent:
POST /ee/admin.php?/cp/members/profile/settings&id=1 HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Content-Type: multipart/form-data; boundary=---------------------------14340353543714380361467519033
Content-Length: 1708
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="csrf_token"
{TOKEN}
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="url"
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="location"
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="bday_d"
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="bday_m"
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="bday_y"
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="bio"
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="language"
english
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="preferences[]"
display_avatars
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="avatar_filename"
ee_paint.jpg
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="upload_avatar"; filename=""
Content-Type: application/octet-stream
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="avatar_picker"
choose
-----------------------------14340353543714380361467519033
Content-Disposition: form-data; name="link_avatar"
http://
-----------------------------14340353543714380361467519033--
The problem originates from the fact that, when the user attempts to change the value of the parameter "avatar_filename" to something like ../../../../../../etc/passwd, as an attempt to include such file, an exception gets thrown, disclosing the full path and some code from the back end.
Note: I didn't check if this is the case for normal uses or not, yet, working on it.
Regards
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 avatar filename value is used in a file path without validation, and the resulting error is displayed with full path and code details instead of a generic message.
Impact
An attacker with admin access could learn the server's file paths and fragments of back-end code, which may aid further attacks; the report does not show that arbitrary files could be read.
What the attacker needed
Admin account; profile edit form access
How it was found
- Log in as an admin and open the personal profile settings page.
- Submit the profile form with the avatar filename field set to a path traversal value.
- Observe the exception page showing the full path and back-end code.
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.
A web server sometimes shows a detailed error page when something goes wrong. Here, sending an unexpected value in a form field made the server reveal where its files live on disk and a snippet of its own code. That information helps an attacker plan further attacks but is not by itself a way to read files.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.