GHSL-2023-026: Cross-site scripting (XSS) in Common Voice - CVE-2023-42808
The Common Voice server used a user-supplied locale parameter in a path to fetch a legal document from GitHub, allowing path traversal. An attacker could supply a crafted locale to make the server fetch and render an attacker-controlled HTML file, leading to reflected cross-site scripting in the server's origin.
release-v1.88.2
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The application did not sanitise the locale parameter before using it in a file path, allowing directory traversal.
Impact
This issue may lead to reflected Cross-Site Scripting (XSS) in the context of Common Voice’s server origin.
What the attacker needed
Victim clicks a crafted link; attacker controls a public GitHub repository
How it was found
- Send a request to the privacy route with a locale value containing path traversal sequences and a fragment identifier.
- The server uses the locale to construct a URL to raw.githubusercontent.com and fetches the file.
- The fetched content is rendered as HTML and returned to the client, executing any scripts.
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.
The website took part of the web address (the locale) and used it to build a file path on another server. By adding special characters like '../', an attacker could make the server fetch a different file, such as an HTML page they control. When that page was shown to a victim, any scripts in it ran as if they came from the Common Voice site, which is cross-site scripting.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.