{"answers":{"affected":"2 open source packages ship an affected version, including hexo. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-25987 exists.","fix":"Upgrade hexo to 6.0.0 or later.","what":"CVE-2021-25987 is a medium-severity cross-site scripting vulnerability in Hexo, published on 30 Nov 2021. 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-2021-25987 and fix it if it is affected.\n\nWhat it is: CVE-2021-25987 is a medium-severity cross-site scripting vulnerability in Hexo, published on 30 Nov 2021. 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: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-25987 exists.\n\nAffected packages and fixed versions:\n- hexo (npm): affected from 0.0.1; fixed in 6.0.0\n- hexo (npm): affected from 0.0.1; fixed in 6.0.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-2021-25987/ (Markdown: https://insights.sbomify.com/CVE-2021-25987/index.md)","id":"CVE-2021-25987","markdown":"https://insights.sbomify.com/CVE-2021-25987/index.md","name":"CVE-2021-25987","record":{"aliases":["GHSA-q54r-r9pr-w7qv"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Static site generator","requires_auth":"none","summary":"A local attacker can inject arbitrary JavaScript into Hexo posts or tags, leading to stored XSS when the site is generated.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Mend","cpe":[{"product":"hexo","vendor":"hexo"}],"cvss":{"score":5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/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":"Hexo versions 0.0.1 to 5.4.0 are vulnerable against stored XSS. The post “body” and “tags” don’t sanitize malicious javascript during web page generation. Local unprivileged attacker can inject arbitrary code.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Hexo - Stored XSS","id":"CVE-2021-25987","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2021"},"n_packages":2,"n_references":2,"next":{"headline":"ifme - Stored Cross-Site Scripting (XSS) in Notifications section","id":"CVE-2021-25988"},"packages":[{"ecosystem":"npm","fixed":["6.0.0"],"introduced":["0.0.1"],"last_affected":[],"package":"hexo","purl":null,"source":"GHSA-q54r-r9pr-w7qv"},{"ecosystem":"npm","fixed":["6.0.0"],"introduced":["0.0.1"],"last_affected":[],"package":"hexo","purl":"pkg:npm/hexo","source":"GHSA-q54r-r9pr-w7qv"}],"prev":{"headline":"Django-wiki - Stored Cross-Site Scripting (XSS) in Notifications Section","id":"CVE-2021-25986"},"products":["Hexo"],"published":"2021-11-30","related":[{"cvss_score":7.5,"headline":"Hexo `include_code` has a path traversal","id":"CVE-2023-39584","kev_date_added":null,"published":"2023-09-08"}],"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":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-30","vendors":["Hexo"]},"summary":"A local attacker can inject arbitrary JavaScript into Hexo posts or tags, leading to stored XSS when the site is generated.","url":"https://insights.sbomify.com/CVE-2021-25987/"}