CVE-2021-45071
Medium · 6.1CVSS
6.1
EPSS
0.7%
Published
Apr 25, 2023
CISA due date
—
Cloudanix analysis
A flaw in Odoo lets attackers upload files with special names that can run harmful code in other users' browsers, potentially exposing company data or letting attackers act as logged-in users.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- XSS
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Allows arbitrary JavaScript injection into victim browsers through unsanitized file names during upload handling, resulting in reflected or stored script execution under the Odoo web application's origin.
Why it matters to the business
Attackers can steal session tokens, perform unauthorized actions on behalf of users, or exfiltrate sensitive business data stored in the Odoo instance, increasing risk of account compromise and data exposure across organizations using the platform.
How an attack unfolds
An attacker crafts an upload file name containing HTML or JavaScript payloads, submits it through any file upload feature in Odoo, and then lures a victim user into viewing the file listing or related record where the payload executes in the browser context.
How to fix it
Upgrade Odoo Community and Enterprise to a version later than 15.0 that contains the upstream fix for filename sanitization; alternatively apply vendor security patches or implement server-side filename validation and output encoding on all file metadata displays.
How to confirm the fix worked
Confirm the currently running Odoo version is newer than 15.0, review file upload and display code paths for proper escaping of filenames, and test upload of files containing script tags to verify they are rendered as plain text.
Typical attack path
- Identify an Odoo instance and a file upload endpoint that displays file metadata
- Upload a file whose name contains a script payload or event handler
- Induce a victim user or administrator to browse to the affected record or file list view
- Execute arbitrary actions in the victim's session such as data theft or privilege abuse
How to detect it
Search web server and Odoo application logs for file upload requests containing suspicious filename patterns such as angle brackets, event handlers, or encoded script fragments; inspect audit trails for unexpected file metadata entries and correlate with user session activity.
- filenames containing <script
- filenames containing onerror=
- filenames containing javascript:
- upload requests returning 200 with payload-like names in access logs
What your security team should do
- Prioritize upgrade of all Odoo instances to a patched release as soon as possible given the public disclosure
- Review and restrict file upload permissions to the minimum required roles
- Enable Content-Security-Policy headers with strict script-src directives to limit XSS impact
- Monitor for unusual file names or upload activity in application logs
The record
Cross-site scripting (XSS) issue Odoo Community 15.0 and earlier and Odoo Enterprise 15.0 and earlier, allows remote attackers to inject arbitrary web script in the browser of a victim, via crafted uploaded file names.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Bitnami | odoo | 0 | 15.0.0 |
| Bitnami | odoo | 0 | 15.0.1 |
| Debian:11 | odoo | 0 | 14.0.0+dfsg.2-7+deb11u1 |
| Debian:13 | odoo | 0 | 16.0.0+dfsg.1-1 |
| Ubuntu:22.04:LTS | odoo | 0 | No fix |
| Ubuntu:24.04:LTS | odoo | 0 | No fix |
| Ubuntu:24.10 | odoo | 0 | No fix |
| Ubuntu:25.04 | odoo | 0 | No fix |
| Ubuntu:25.10 | odoo | 0 | No fix |
Related vulnerabilities
- CVE-2021-45111 Improper access control in Odoo Community 15.0 and earlier and Odoo Enterprise 15.0 and… Also affects odoo
- CVE-2021-44476 A sandboxing issue in Odoo Community 15.0 and earlier and Odoo Enterprise 15.0 and… Also affects odoo
- CVE-2021-44775 Cross-site scripting (XSS) issue in Website app of Odoo Community 15.0 and earlier and… Also affects odoo
- CVE-2021-44460 Improper access control in Odoo Community 13.0 and earlier and Odoo Enterprise 13.0 and… Also affects odoo
- CVE-2021-44547 A sandboxing issue in Odoo Community 15.0 and Odoo Enterprise 15.0 allows authenticated… Also affects odoo
- CVE-2021-44465 Improper access control in Odoo Community 13.0 and earlier and Odoo Enterprise 13.0 and… Also affects odoo
- CVE-2024-4367 A type check was missing when handling fonts in PDF.js, which would allow arbitrary… Also affects odoo
- CVE-2024-34342 react-pdf displays PDFs in React apps. Also affects odoo