{"answers":{"affected":"2 open source packages ship an affected version, including tarteaucitronjs. It affects 2 products.","exploited":"There is no known exploitation of CVE-2025-31476 in the wild and no public exploit code.","fix":"Upgrade tarteaucitronjs to 1.20.1 or later.","what":"CVE-2025-31476 is a medium-severity cross-site scripting vulnerability in AmauriC tarteaucitron.js, published on 7 Apr 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-31476 and fix it if it is affected.\n\nWhat it is: CVE-2025-31476 is a medium-severity cross-site scripting vulnerability in AmauriC tarteaucitron.js, published on 7 Apr 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-31476 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- tarteaucitronjs (npm): affected all versions; fixed in 1.20.1\n- tarteaucitronjs (npm): affected all versions; fixed in 1.20.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-31476/ (Markdown: https://insights.sbomify.com/CVE-2025-31476/index.md)","id":"CVE-2025-31476","markdown":"https://insights.sbomify.com/CVE-2025-31476/index.md","name":"CVE-2025-31476","record":{"aliases":["DRUPAL-CONTRIB-2025-027","GHSA-p5g4-v748-6fh8"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript cookie banner","requires_auth":"high_privilege","summary":"High-privilege users can inject malicious JavaScript via insecure URL schemes in tarteaucitron.js, leading to arbitrary code execution and data theft.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"tarteaucitronjs","vendor":"amauri"},{"product":"tacjs","vendor":"tacjs_project"}],"cvss":{"score":4.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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.","ecosystems":["Packagist:https://packages.drupal.org/8","npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"tarteaucitron.js allows url scheme injection via unfiltered inputs","id":"CVE-2025-31476","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"Improper Scope Validation in the open Endpoint of tauri-plugin-shell","id":"CVE-2025-31477"},"packages":[{"ecosystem":"npm","fixed":["1.20.1"],"introduced":["0"],"last_affected":[],"package":"tarteaucitronjs","purl":null,"source":"GHSA-p5g4-v748-6fh8"},{"ecosystem":"npm","fixed":["1.20.1"],"introduced":["0"],"last_affected":[],"package":"tarteaucitronjs","purl":"pkg:npm/tarteaucitronjs","source":"GHSA-p5g4-v748-6fh8"},{"ecosystem":"Packagist:https://packages.drupal.org/8","fixed":["6.7.0"],"introduced":["0"],"last_affected":[],"package":"drupal/tacjs","purl":"pkg:composer/drupal/tacjs?repository_url=https:%2F%2Fpackages.drupal.org%2F8","source":"DRUPAL-CONTRIB-2025-027"}],"prev":{"headline":"tarteaucitron.js allows prototype pollution via custom text injection","id":"CVE-2025-31475"},"products":["tarteaucitron.js"],"published":"2025-04-07","related":[{"cvss_score":5.5,"headline":"tarteaucitron.js allows UI manipulation via unrestricted CSS injection","id":"CVE-2025-31138","kev_date_added":null,"published":"2025-04-07"},{"cvss_score":5.5,"headline":"tarteaucitron.js allows prototype pollution via custom text injection","id":"CVE-2025-31475","kev_date_added":null,"published":"2025-04-07"},{"cvss_score":4.4,"headline":"tarteaucitron.js has Regular Expression Denial of Service (ReDoS) vulnerability","id":"CVE-2026-22809","kev_date_added":null,"published":"2026-01-13"},{"cvss_score":4.2,"headline":"tarteaucitron.js vulnerable to DOM Clobbering via document.currentScript","id":"CVE-2025-48939","kev_date_added":null,"published":"2025-07-03"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"MIT","name":"Drupal","prefix":"DRUPAL"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-06-12","vendors":["AmauriC"]},"summary":"High-privilege users can inject malicious JavaScript via insecure URL schemes in tarteaucitron.js, leading to arbitrary code execution and data theft.","url":"https://insights.sbomify.com/CVE-2025-31476/"}