User input as database column
The Yclas admin interface allowed searching on arbitrary database columns via a filter parameter, enabling extraction of password hashes, and a log-reading tool was vulnerable to path traversal, allowing retrieval of the hash key. An attacker with admin privileges could combine these to crack other users' passwords.
sjoerdlangkemper.nl
Published on sjoerdlangkemper.nl
Yclas is a CMS for classified advertisements. Its administrator interface has general search functionality, and was vulnerable to path traversal.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application used user-supplied input directly as a database column name in a filter parameter without validating it against a list of allowed columns, and the log viewer constructed file paths from user input without sanitising path traversal sequences.
Impact
An attacker with administrator privileges could obtain other users' password hashes and the secret key, then crack the passwords, potentially yielding an administrator password that could be reused elsewhere; the attack is complex, loud and slow.
What the attacker needed
Administrator privileges
The fix
The path traversal vulnerability was fixed by validating the date format.
How it was found
- Use the admin search with a filter parameter to test if a character exists in the password hash.
- Iterate character by character to extract the full hash.
- Use the log-reading tool with a crafted date to read the auth config file and obtain the hash key.
- Combine the hash and key and crack with hashcat mode 1460.
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 write-up has not been written yet. The Original tab links to the source.
This report describes two flaws in a classified ads system. One let an admin search on any database column, including the password column, to slowly reveal password hashes. The other let an admin read files outside the intended log folder, including a config file with the secret key needed to crack those hashes. Together, an admin could recover other users' passwords.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.