{"id":"CVE-2021-46888","aliases":["CVE-2021-46888","HSEC-2023-0008"],"related":[],"kind":"vulnerability","state":"published","title":"Stored XSS in hledger-web","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"# Stored XSS in *hledger-web*\n\nAn issue was discovered in *hledger-web* < 1.23. A Stored Cross-Site\nScripting (XSS) vulnerability exists in `toBloodhoundJson` that\nallows an attacker to execute JavaScript by encoding user-controlled\nvalues in a payload with base64 and parsing them with the `atob`\nfunction.\n\n*hledger-web* forms sanitise obvious JavaScript, but not obfuscated\nJavaScript (see [OWASP Filter Evasion Cheat Sheet][cheatsheet]).\nThis means *hledger-web* instances, especially anonymously-writable\nones like `demo.hledger.org`, could be loaded with malicious\nJavaScript to be executed by subsequent visitors.\n\n[cheatsheet]: https://owasp.org/www-community/xss-filter-evasion-cheatsheet\n\nReported by Gaspard Baye and Hamidullah Muslih.  Fix by Arsen\nArsenović.","format":"markdown","source":"hsec"}],"published":"2023-05-21T00:00:00.000Z","modified":"2026-06-17T04:15:45.270Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.24","status":"affected","fixed":"1.23"}],"ecosystem":"Hackage","package":"hledger-web","purl":"pkg:hackage/hledger-web","source":"hsec"},{"ranges":[{"status":"affected","fixed":"1.23"}],"vendor":"hledger","product":"hledger","cpe":"cpe:2.3:a:hledger:hledger:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/simonmichael/hledger/issues/1525","tags":["exploit","issue-tracking","report","vendor-advisory","x-transferred"],"sources":["cvelist","hsec","nvd"]},{"url":"https://github.com/simonmichael/hledger/pull/1663","tags":["exploit","fix","issue-tracking","patch","third-party-advisory","x-transferred"],"sources":["cvelist","hsec","nvd"]},{"url":"https://github.com/simonmichael/hledger/releases/tag/1.23","tags":["release-notes","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.youtube.com/watch?v=QnRO-VkfIic","tags":["evidence","exploit","third-party-advisory","x-transferred"],"sources":["cvelist","hsec","nvd"]},{"url":"https://github.com/simonmichael/hledger/commit/ec51d28839b2910eea360b1b8c72904b51cf7821","tags":["introduced"],"sources":["hsec"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-01-21T16:55:30.047Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-46888","url":"https://www.cve.org/CVERecord?id=CVE-2021-46888","licence":"CVE Terms of Use","modified":"2025-01-21T16:56:19.679Z"},{"source":"hsec","name":"Haskell Security Advisories","id":"HSEC-2023-0008","url":"https://osv.dev/vulnerability/HSEC-2023-0008","licence":"CC0-1.0","modified":"2025-11-14T18:15:37.223Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-46888","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-46888","licence":"Public domain","modified":"2026-06-17T04:15:45.270Z"}],"updatedAt":"2026-11-25T22:58:08.467Z","epss":{"score":0.00765,"percentile":0.56653,"date":"2026-12-01T12:00:22.000Z"}}