Dosage vulnerable to a Directory Traversal through crafted HTTP responses
Description
Published to the GitHub Advisory Database
Nov 4, 2025
Reviewed
Nov 4, 2025
Published by the National Vulnerability Database
Nov 7, 2025
Last updated
Nov 7, 2025
Impact
When downloadinging comic images, Dosage constructs target file names from different aspects of the remote comic (page URL, image URL, page content, etc.). While the basename is properly stripped of directory-traversing characters, the file extension is taken from the HTTP
Content-Typeheader. This allows a remote attacker (or a Man-in-the-Middle, if the comic is served over HTTP) to write arbitrary files outside the target directory (if additional conditions are met).Patches
Fixed in release 3.2. The fix is small and self-contained, so distributors might elect to backport the fix to older versions.
Workarounds
No
References