# CVE-2025-31476: tarteaucitron.js allows url scheme injection via unfiltered inputs

- Severity: Medium 4.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.36%, higher than 31% of CVEs (2026-12-01)
- Published: 2025-04-02T17:01:45.000Z
- Modified: 2026-09-10T03:46:04.502Z
- Also known as: GHSA-p5g4-v748-6fh8, DRUPAL-CONTRIB-2025-027
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- AmauriC tarteaucitron.js: < 1.20.1
- tarteaucitronjs (npm): before 1.20.1
- drupal/tacjs (Packagist:https://packages.drupal.org/8): before 6.7.0
- amauri tarteaucitronjs: before 1.20.1
- tacjs_project tacjs: from 8.x-1.0 before 8.x-6.7

## Every score

- GitHub_M: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-p5g4-v748-6fh8> (third-party-advisory, web)
- <https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02> (patch, 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)

## Sources

- CVE List: [CVE-2025-31476](https://www.cve.org/CVERecord?id=CVE-2025-31476), CVE Terms of Use, modified 2025-06-12
- GitHub Advisory Database: [GHSA-p5g4-v748-6fh8](https://github.com/advisories/GHSA-p5g4-v748-6fh8), CC-BY-4.0, modified 2025-12-10
- Drupal Security Team: [DRUPAL-CONTRIB-2025-027](https://osv.dev/vulnerability/DRUPAL-CONTRIB-2025-027), MIT, modified 2026-09-10
- NVD: [CVE-2025-31476](https://nvd.nist.gov/vuln/detail/CVE-2025-31476), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-31476 · Whole record: https://cve.day/CVE-2025-31476.json · Rebuilt by cve.day 2026-11-25T22:58:56.156Z
