{"answers":{"affected":"1 open source package ship an affected version, including hledger-web. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-46888 in the wild and no public exploit code.","fix":"Upgrade hledger-web to 1.23 or later.","what":"CVE-2021-46888 is a medium-severity cross-site scripting vulnerability in n/a, published on 21 May 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-46888 and fix it if it is affected.\n\nWhat it is: CVE-2021-46888 is a medium-severity cross-site scripting vulnerability in n/a, published on 21 May 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-46888 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- hledger-web (Hackage): affected from 0.24; fixed in 1.23\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-46888/ (Markdown: https://insights.sbomify.com/CVE-2021-46888/index.md)","id":"CVE-2021-46888","markdown":"https://insights.sbomify.com/CVE-2021-46888/index.md","name":"CVE-2021-46888","record":{"aliases":["GHSA-9fcq-h23h-rxhx","HSEC-2023-0008"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Haskell accounting library","requires_auth":"low_privilege","summary":"Stored XSS in hledger allows attackers to execute JavaScript via base64-encoded payloads in JSON output, affecting users viewing generated reports.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"hledger","vendor":"hledger"}],"cvss":{"score":5.4,"severity":"medium","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:L/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":"An issue was discovered in hledger before 1.23. A Stored Cross-Site Scripting (XSS) vulnerability exists in toBloodhoundJson that allows an attacker to execute JavaScript by encoding user-controlled values in a payload with base64 and parsing them with the atob function.","ecosystems":["Hackage"],"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":"Cross-site scripting in n/a","id":"CVE-2021-46888","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"xss","year":"2021"},"n_packages":1,"n_references":4,"next":{"headline":"Cross-site scripting in n/a","id":"CVE-2021-46889"},"packages":[{"ecosystem":"Hackage","fixed":["1.23"],"introduced":["0.24"],"last_affected":[],"package":"hledger-web","purl":"pkg:hackage/hledger-web","source":"HSEC-2023-0008"}],"prev":{"headline":"Memory corruption in EMUI","id":"CVE-2021-46887"},"products":["n/a"],"published":"2023-05-21","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"open","licence":"CC0 1.0","name":"Haskell Security Response Team","prefix":"HSEC"},{"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-01-21","vendors":["n/a"]},"summary":"Stored XSS in hledger allows attackers to execute JavaScript via base64-encoded payloads in JSON output, affecting users viewing generated reports.","url":"https://insights.sbomify.com/CVE-2021-46888/"}