GHSA-mq6v-w35g-3c97 Local File Inclusion vulnerability in zmarkdown
An attacker can include arbitrary local files in generated LaTeX documents by specifying known paths, potentially exposing sensitive host data.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-mq6v-w35g-3c97?
GHSA-mq6v-w35g-3c97 is a path traversal vulnerability in zmarkdown, published on 3 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Impact
A minor Local File Inclusion vulnerability has been found in
zmarkdown, which allowed for images with a known path on
the host machine to be included inside a LaTeX document.
To prevent it, a new option has been created that allow to replace
invalid paths with a default image instead of linking the image on the
host directly. zmarkdown has been updated to make this setting the
default.
Every user of zmarkdown is likely impacted, except if
disabling LaTeX generation or images download. Here
is an example of including an image from an invalid path:

Will effectively redownload and include the image
found at /tmp/img.png.
Patches
The vulnerability has been patched in version 10.1.3. If impacted, you should update to this version as soon as possible.
Workarounds
Disable images downloading, or sanitize paths.
For more information
If you have any questions or comments about this advisory, open an issue in ZMarkdown.
Which versions are affected by GHSA-mq6v-w35g-3c97?
2 open source packages ship an affected version, including zmarkdown.
| Package | Affected | Fixed in |
|---|---|---|
zmarkdown npm | All versions | 10.1.3 |
zmarkdown npm | All versions | 10.1.3 |
How do I fix GHSA-mq6v-w35g-3c97?
Upgrade zmarkdown to 10.1.3 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is GHSA-mq6v-w35g-3c97 being exploited?
There is no known exploitation of GHSA-mq6v-w35g-3c97 in the wild and no public exploit code.