CVE-2021-46888
JSON

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 packageVersionsReported by
Unspecified productn/aCVE List
hledger-web (Hackage)from 0.24 before 1.23Haskell Security Advisories
hledger hledgerbefore 1.23NVD

Classification

CWE-79

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

Sources

SourceRecordLicence
CVE ListCVE-2021-46888 changed 2025-01-21CVE Terms of Use
Haskell Security AdvisoriesHSEC-2023-0008 changed 2025-11-14CC0-1.0
NVDCVE-2021-46888 changed 2026-06-17Public domain