Drupal File file_create_filename Persistent Cross-Site Scripting Vulnerability
The file_create_filename function in Drupal's file.inc did not properly validate user-supplied filenames, allowing an attacker to inject an arbitrary script. An attacker could exploit this to execute code in the context of the web server, though user interaction is required.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of Drupal. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.
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
Likely, the file_create_filename function did not sanitise or validate user-supplied filename input, allowing script injection.
Impact
An attacker could execute arbitrary code in the context of the web server, but user interaction is required and the exploit may need to be combined with other vulnerabilities.
What the attacker needed
Victim visits a malicious page; or opens a malicious file
The fix
Drupal issued an update to correct this vulnerability.
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.
Drupal is a content management system. A function that creates filenames failed to check what characters were in the name, so an attacker could put a script into a filename. When a victim visits a malicious page or opens a malicious file, that script runs in the website's context, which can lead to further compromise.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.