{"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-48939 in the wild and no public exploit code.","fix":"Upgrade tarteaucitronjs to 1.22.0 or later.","what":"CVE-2025-48939 is a medium-severity vulnerability in AmauriC tarteaucitron.js, published on 3 Jul 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-48939 and fix it if it is affected.\n\nWhat it is: CVE-2025-48939 is a medium-severity vulnerability in AmauriC tarteaucitron.js, published on 3 Jul 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-48939 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- tarteaucitronjs (npm): affected all versions; fixed in 1.22.0\n- tarteaucitronjs (npm): affected all versions; fixed in 1.22.0\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-48939/ (Markdown: https://insights.sbomify.com/CVE-2025-48939/index.md)","id":"CVE-2025-48939","markdown":"https://insights.sbomify.com/CVE-2025-48939/index.md","name":"CVE-2025-48939","record":{"aliases":["GHSA-q43x-79jr-cq98"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"JavaScript cookie banner","requires_auth":"high_privilege","summary":"An attacker can manipulate DOM elements to alter the script's CDN domain, potentially bypassing security controls or causing script loading failures.","user_interaction":"required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"tarteaucitronjs","vendor":"amauri"}],"cvss":{"score":4.2,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-138","name":"Improper Neutralization of Special Elements"}],"description":"tarteaucitron.js is a compliant and accessible cookie banner. Prior to version 1.22.0, a vulnerability was identified in tarteaucitron.js where document.currentScript was accessed without verifying that it referenced an actual \u003cscript\u003e element. If an attacker injected an HTML element, it could clobber the document.currentScript property. This causes the script to resolve incorrectly to an element instead of the \u003cscript\u003e tag, leading to unexpected behavior or failure to load the script path correctly. This issue arises because in some browser environments, named DOM elements become properties on the global document object. An attacker with control over the HTML could exploit this to change the CDN domain of tarteaucitron. This issue has been patched in version 1.22.0.","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 vulnerable to DOM Clobbering via document.currentScript","id":"CVE-2025-48939","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"other","year":"2025"},"n_packages":2,"n_references":2,"next":{"headline":"MyBB's upgrade component vulnerable to local file inclusion","id":"CVE-2025-48940"},"packages":[{"ecosystem":"npm","fixed":["1.22.0"],"introduced":["0"],"last_affected":[],"package":"tarteaucitronjs","purl":null,"source":"GHSA-q43x-79jr-cq98"},{"ecosystem":"npm","fixed":["1.22.0"],"introduced":["0"],"last_affected":[],"package":"tarteaucitronjs","purl":"pkg:npm/tarteaucitronjs","source":"GHSA-q43x-79jr-cq98"}],"prev":{"headline":"Prevent GitHub CLI and extensions from executing arbitrary commands from compromised GitHub Enterprise Server","id":"CVE-2025-48938"},"products":["tarteaucitron.js"],"published":"2025-07-03","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.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"}],"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":"partial"},"state":"PUBLISHED","updated":"2025-07-03","vendors":["AmauriC"]},"summary":"An attacker can manipulate DOM elements to alter the script's CDN domain, potentially bypassing security controls or causing script loading failures.","url":"https://insights.sbomify.com/CVE-2025-48939/"}