{"answers":{"affected":"2 open source packages ship an affected version, including tarteaucitronjs. It affects 1 product.","exploited":"There is no known exploitation of CVE-2025-31138 in the wild and no public exploit code.","fix":"Upgrade tarteaucitronjs to 1.20.1 or later.","what":"CVE-2025-31138 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, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-31138 and fix it if it is affected.\n\nWhat it is: CVE-2025-31138 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, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-31138 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-31138/ (Markdown: https://insights.sbomify.com/CVE-2025-31138/index.md)","id":"CVE-2025-31138","markdown":"https://insights.sbomify.com/CVE-2025-31138/index.md","name":"CVE-2025-31138","record":{"aliases":["GHSA-7524-3396-fqv3"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass","other"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript cookie banner","requires_auth":"high_privilege","summary":"Attackers can inject CSS to manipulate UI elements, enabling clickjacking and disrupting website functionality in tarteaucitron.js.","user_interaction":"not_required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"tarteaucitronjs","vendor":"amauri"}],"cvss":{"score":5.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-1021","name":"Improper Restriction of Rendered UI Layers or Frames"}],"description":"tarteaucitron.js is a compliant and accessible cookie banner. A vulnerability was identified in tarteaucitron.js prior to 1.20.1, where user-controlled inputs for element dimensions (width and height) were not properly validated. This allowed an attacker with direct access to the site's source code or a CMS plugin to set values like 100%;height:100%;position:fixed;, potentially covering the entire viewport and facilitating clickjacking attacks. An attacker with high privileges could exploit this vulnerability to overlay malicious UI elements on top of legitimate content, trick users into interacting with hidden elements (clickjacking), or disrupt the intended functionality and accessibility of the website. This vulnerability is fixed in 1.20.1.","ecosystems":["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 UI manipulation via unrestricted CSS injection","id":"CVE-2025-31138","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2025"},"n_packages":2,"n_references":2,"next":{"headline":"Information disclosure in TeamCity","id":"CVE-2025-31139"},"packages":[{"ecosystem":"npm","fixed":["1.20.1"],"introduced":["0"],"last_affected":[],"package":"tarteaucitronjs","purl":null,"source":"GHSA-7524-3396-fqv3"},{"ecosystem":"npm","fixed":["1.20.1"],"introduced":["0"],"last_affected":[],"package":"tarteaucitronjs","purl":"pkg:npm/tarteaucitronjs","source":"GHSA-7524-3396-fqv3"}],"prev":{"headline":"Remix and React Router allow URL manipulation via Host / X-Forwarded-Host headers","id":"CVE-2025-31137"},"products":["tarteaucitron.js"],"published":"2025-04-07","related":[{"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.8,"headline":"tarteaucitron.js allows url scheme injection via unfiltered inputs","id":"CVE-2025-31476","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":"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":"total"},"state":"PUBLISHED","updated":"2025-04-07","vendors":["AmauriC"]},"summary":"Attackers can inject CSS to manipulate UI elements, enabling clickjacking and disrupting website functionality in tarteaucitron.js.","url":"https://insights.sbomify.com/CVE-2025-31138/"}