5.4medium
Stored XSS in hledger-web
- Severity
- 5.4medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.77% (higher than 56% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- HSEC-2023-0008
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| hledger-web (Hackage) | from 0.24 before 1.23 | Haskell Security Advisories |
| hledger hledger | before 1.23 | NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
Haskell Security Advisories
Stored XSS in hledger-web
An issue was discovered in hledger-web < 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.
hledger-web forms sanitise obvious JavaScript, but not obfuscated
JavaScript (see OWASP Filter Evasion Cheat Sheet).
This means hledger-web instances, especially anonymously-writable
ones like demo.hledger.org, could be loaded with malicious
JavaScript to be executed by subsequent visitors.
Reported by Gaspard Baye and Hamidullah Muslih. Fix by Arsen Arsenović.
References
| https://github.com/simonmichael/hledger/issues/1525 | exploit, issue-tracking, report, vendor-advisory | |
| https://github.com/simonmichael/hledger/pull/1663 | exploit, fix, issue-tracking, patch, third-party-advisory | |
| https://github.com/simonmichael/hledger/releases/tag/1.23 | release-notes | |
| https://www.youtube.com/watch?v=QnRO-VkfIic | evidence, exploit, third-party-advisory | |
| https://github.com/simonmichael/hledger/commit/ec51d28839b2910eea360b1b8c72904b51cf7821 | introduced | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-46888 changed 2025-01-21 | CVE Terms of Use |
| Haskell Security Advisories | HSEC-2023-0008 changed 2025-11-14 | CC0-1.0 |
| NVD | CVE-2021-46888 changed 2026-06-17 | Public domain |