How a Simple language Parameter Exposed an Internal Drupal CMS
A public endpoint passed a user-supplied language parameter directly into an internal URL used by a backend proxy to reach an internal Drupal CMS. By combining path traversal with an encoded URL fragment, an attacker could reach internal JSON:API routes and read user accounts, file references, documents and images without authentication.
medium.com
Published on medium.com
This writeup is about a bug that looked very simple at the beginning, but after following the flow carefully, it turned into a valid report on a private Bug Bounty program.
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
The backend inserted the user-controlled language value directly into an internal URL path without validating it against a fixed list of allowed languages.
Impact
An unauthenticated attacker could read internal Drupal JSON:API resources, exposing 83 user accounts, 1,041 internal file references, 44 CMS documents and 315 internal images through the public proxy.
What the attacker needed
None
The fix
The language parameter should be restricted to a strict allowlist, internal errors should not be exposed, and internal JSON:API routes should require authentication; the report says a fix was deployed and confirmed.
How it was found
- Find the public endpoint that takes a language parameter.
- Send malformed values and observe an error revealing the internal Drupal host.
- Send traversal sequences in the language value and confirm the backend processes them.
- Append an encoded fragment so the backend's fixed suffix is ignored.
- Request internal JSON:API user and file paths through the public 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 write-up has not been written yet. The Original tab links to the source.
A web app had a language setting in its address, and the server used that value to build a request to a private content system. Because the value was not checked, someone could put path tricks in it to make the server fetch other private pages instead. This let an outsider read internal user and file information through the public site.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.