hsec-2023-0008
Vulnerability from osv_haskell
Published
2025-11-14 14:45
Modified
2025-11-14 14:45
Summary
Stored XSS in hledger-web
Details

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ć.


{
  "affected": [
    {
      "database_specific": {
        "human_link": "https://github.com/haskell/security-advisories/tree/main/advisories/published/2023/HSEC-2023-0008.md",
        "osv": "https://raw.githubusercontent.com/haskell/security-advisories/refs/heads/generated/osv-export/2023/HSEC-2023-0008.json"
      },
      "package": {
        "ecosystem": "Hackage",
        "name": "hledger-web"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.24"
            },
            {
              "fixed": "1.23"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
          "type": "CVSS_V3"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2021-46888"
  ],
  "database_specific": {
    "home": "https://github.com/haskell/security-advisories",
    "osvs": "https://raw.githubusercontent.com/haskell/security-advisories/refs/heads/generated/osv-export",
    "repository": "https://github.com/haskell/security-advisories"
  },
  "details": "# Stored XSS in *hledger-web*\n\nAn issue was discovered in *hledger-web* \u003c 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\u0107.\n",
  "id": "HSEC-2023-0008",
  "modified": "2025-11-14T14:45:34Z",
  "published": "2025-11-14T14:45:34Z",
  "references": [
    {
      "type": "REPORT",
      "url": "https://github.com/simonmichael/hledger/issues/1525"
    },
    {
      "type": "INTRODUCED",
      "url": "https://github.com/simonmichael/hledger/commit/ec51d28839b2910eea360b1b8c72904b51cf7821"
    },
    {
      "type": "EVIDENCE",
      "url": "https://www.youtube.com/watch?v=QnRO-VkfIic"
    },
    {
      "type": "FIX",
      "url": "https://github.com/simonmichael/hledger/pull/1663"
    }
  ],
  "schema_version": "1.5.0",
  "summary": "Stored XSS in hledger-web"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…