dosage

GHSA-75MW-H36V-2JV7

GHSA-75MW-H36V-2JV7 is a medium-severity cross-site scripting (XSS) vulnerability in dosage (pip), affecting versions <= 3.2. It is fixed in 3.3.

Key facts
CVSS score
6.1
Medium
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
dosage
Fixed in
3.3
Disclosed
Not available

Summary

Summary The HTML and RSS output handlers in dosagelib/events.py write user-controlled content (comic text and page URLs) directly into generated files without proper HTML escaping. When a user scrapes a malicious webcomic and opens the generated HTML/RSS file, attacker-controlled JavaScript can execute in their browser. CWE: CWE-79 - Improper Neutralization of Input During Web Page Generation (Cross-site Scripting) Details Vulnerable Code Locations The vulnerability exists in dosagelib/events.py where untrusted content is written to HTML/RSS output without escaping: RSSEventHandler (lines 116-118) HtmlEventHandler (lines 232, 238) Root Cause BasicScraper.fetchText() in scraper.py:422 calls html.unescape() on extracted text The output handlers never call html.escape() before writing to files No sanitization of URLs or text content occurs anywhere in the output pipeline Data Flow PoC I created a proof-of-concept that demonstrates the vulnerability by simulating a malicious comic source. Prerequisites Docker installed and running PoC Files Create these files in a poc/ directory: poc/Dockerfile poc/poc.py poc/runpoc.sh Running the PoC PoC Output The output shows that: The javascript: URL is written directly into <a href> attributes The <script> tag from comic text appears unescaped in the HTML body Impact Who is affected? Users who use dosage --output html or dosage --output rss options Anyone who opens the generated HTML/RSS files in a browser Attack scenario Attacker creates or compromises a webcomic site Attacker injects JavaScript into image title/alt attributes: html <img src="comic.png" title="Funny!<script>alert(1)</script>"> Victim runs: dosage MaliciousComic --output html The generated Comics/html/comics-YYYYMMDD.html contains the unescaped script When victim opens the file, JavaScript executes Potential consequences Cookie theft if files are served over HTTP Local file access via file:// protocol Phishing attacks through DOM manipulation Recommended Fix Escape all user-controlled content before writing to HTML/RSS: For URLs, validating that they use safe protocols (http://, https://) would also help prevent javascript: URLs. Resources CWE-79: Cross-site Scripting (XSS) OWASP XSS Prevention Cheat Sheet Python html.escape() documentation

Impact

What is cross-site scripting (XSS)?

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

Severity and exposure

GHSA-75MW-H36V-2JV7 has a CVSS score of 6.1 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (3.3). Upgrading removes the vulnerable code path.

Affected versions

pip

  • dosage (<= 3.2)

Security releases

  • dosage → 3.3 (pip)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether GHSA-75MW-H36V-2JV7 is reachable in your applications. Explore open-source security for your team.

See if GHSA-75MW-H36V-2JV7 is reachable in your applications. Get a demo

Already deployed Kodem? See GHSA-75MW-H36V-2JV7 in your environment

Remediation advice

Upgrade dosage to 3.3 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about GHSA-75MW-H36V-2JV7

What is GHSA-75MW-H36V-2JV7?

GHSA-75MW-H36V-2JV7 is a medium-severity cross-site scripting (XSS) vulnerability in dosage (pip), affecting versions <= 3.2. It is fixed in 3.3. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.

How severe is GHSA-75MW-H36V-2JV7?

GHSA-75MW-H36V-2JV7 has a CVSS score of 6.1 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of dosage are affected by GHSA-75MW-H36V-2JV7?

dosage (pip) versions <= 3.2 is affected.

Is there a fix for GHSA-75MW-H36V-2JV7?

Yes. GHSA-75MW-H36V-2JV7 is fixed in 3.3. Upgrade to this version or later.

Is GHSA-75MW-H36V-2JV7 exploitable, and should I be worried?

Whether GHSA-75MW-H36V-2JV7 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether GHSA-75MW-H36V-2JV7 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix GHSA-75MW-H36V-2JV7?

Upgrade dosage to 3.3 or later.

Stop the waste.
Protect your environment with Kodem.