tarteaucitron.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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-31476
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 03:15 UTC · Revision 1
Source evidence
tarteaucitron.js allows url scheme injection via unfiltered inputs
core-osv · Original sourcePublished 7 Apr 2025, 14:52 UTC
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.
osv:CVE-2025-31476
Complete source record
{
"id": "298eb6cfb617950f273e7dc912114fc3131e70a72aee18f2d982f899d92f06dc",
"url": "https://osv.dev/vulnerability/CVE-2025-31476",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "tarteaucitron.js allows url scheme injection via unfiltered inputs",
"summary": "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.",
"evidence": "osv:CVE-2025-31476",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2025-31476",
"aliases": [
"CVE-2025-31476",
"DRUPAL-CONTRIB-2025-027",
"GHSA-p5g4-v748-6fh8"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/amauric/tarteaucitron.js",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "034867f11242259dd22bb93328681bd6ce3d718d"
},
{
"fixed": "2fa1e01023bce2e4b813200600bb1619d56ceb02"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:amauri:tarteaucitronjs:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.20.1"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "2fa1e01023bce2e4b813200600bb1619d56ceb02"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v1.19.0",
"v1.18.1",
"v1.18.0",
"v1.17.0",
"v1.16.1",
"v1.16.0",
"v1.15.0",
"v1.14.0",
"v1.13.1",
"v1.13.0",
"v1.12.0",
"v1.11.0",
"v1.10.0",
"v1.9.9",
"v1.9.8",
"v1.9.7",
"v1.9.6",
"v1.9.5",
"v1.9.4",
"v1.9.3",
"v1.9.1",
"20210329",
"20210306",
"20210305",
"v1.8.4",
"v1.8.3",
"v1.8.2",
"v1.8.1",
"v1.8",
"v1.6",
"v1.5",
"20200910",
"v1.4",
"v1.3",
"v1.2.0",
"v1.2",
"V1.2",
"v1.1",
"v1.0",
"v0.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-31476.json"
}
}
],
"modified": "2026-10-28T02:30:33.010394664Z",
"provider": "osv",
"references": [
"https://www.drupal.org/sa-contrib-2025-027",
"https://github.com/AmauriC/tarteaucitron.js/security/advisories/GHSA-p5g4-v748-6fh8",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31476.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-31476",
"https://github.com/AmauriC/tarteaucitron.js/commit/2fa1e01023bce2e4b813200600bb1619d56ceb02"
],
"provider_metadata": {
"cwe_ids": [
"CWE-79"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31476.json"
}
},
"related_cves": [
{
"value": "CVE-2025-31476",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 499920,
"published_at": "2025-04-07T14:52:12.728+00:00"
}