CVE-2025-31476
MEDIUM 4.8CVSS 3.1tarteaucitron.js allows url scheme injection via unfiltered inputs
tarteaucitron.js is a compliant and accessible cookie banner. A vulnerability was identified in tarteaucitron.js, allowing a user with high privileges (access to the site's source code or a CMS plugin) to enter a URL containing an insecure scheme such as javascript:alert(). Before the fix, URL validation was insufficient, which could allow arbitrary JavaScript execution if a user clicked on a malicious link. An attacker with high privileges could insert a link exploiting an insecure URL scheme, leading to execution of arbitrary JavaScript code, theft of sensitive data through phishing attacks, or modification of the user interface behavior. This vulnerability is fixed in 1.20.1.
- Published
- 7 Apr 2025
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- DRUPAL-CONTRIB-2025-027GHSA-p5g4-v748-6fh8
- Sources
- NVDJSONOSV DRUPAL-CONTRIB-2025-027JSONOSV GHSA-p5g4-v748-6fh8JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.8 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.8 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | amauri | tarteaucitronjscpe:2.3:a:amauri:tarteaucitronjs:*:*:*:*:*:node.js:*:* |
< 1.20.1 | 1.20.1 |
| NVD | tacjs_project | tacjscpe:2.3:a:tacjs_project:tacjs:*:*:*:*:*:drupal:*:* |
>= 8.x-1.0, < 8.x-6.7 | 8.x-6.7 |
| OSV | Packagist:https://packages.drupal.org/8 | drupal/tacjs | < 6.7.0 | 6.7.0 |
| OSV | npm | tarteaucitronjs | < 1.20.1 | 1.20.1 |
References
- https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02 · Patch, WEB
- https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-p5g4-v748-6fh8 · Third Party Advisory, WEB
- https://www.drupal.org/sa-contrib-2025-027 · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-31476 · ADVISORY
- https://github.com/AmauriC/tarteaucitron.js · PACKAGE
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 7 Apr 2025)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 2 Apr 2025)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 7 Apr 2025)