CVE-2025-48939 Details
Description
tarteaucitron.js is a compliant and accessible cookie banner. Prior to version 1.22.0, a vulnerability was identified in tarteaucitron.js where document.currentScript was accessed without verifying that it referenced an actual <script> element. If an attacker injected an HTML element, it could clobber the document.currentScript property. This causes the script to resolve incorrectly to an element instead of the <script> tag, leading to unexpected behavior or failure to load the script path correctly. This issue arises because in some browser environments, named DOM elements become properties on the global document object. An attacker with control over the HTML could exploit this to change the CDN domain of tarteaucitron. This issue has been patched in version 1.22.0.
A vulnerability exists in tarteaucitron.js cookie banner versions prior to 1.22.0, where the library improperly accesses document.currentScript without confirming it points to a valid <script> element. This flaw allows an attacker to inject an HTML element that overwrites the currentScript property, causing the script to misinterpret the source and potentially disrupt functionality. In certain browser environments, named DOM elements can become global document properties, creating an opportunity for exploitation. An attacker could manipulate the CDN domain from which tarteaucitron is loaded.
Users can upgrade to tarteaucitron.js version 1.22.0 or later to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 3, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/AmauriC/tarteaucitron.js/commit/230a3b69d363837acfa895823d841e0608826ba3 | [email protected] | Patch |
| https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-q43x-79jr-cq98 | [email protected] | ExploitPatchVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-138 | Improper Neutralization of Special Elements | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| amauri tarteaucitronjs | < 1.22.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 21, 2025 | Initial Analysis | [email protected] |
| Jul 3, 2025 | New CVE Received | [email protected] |