GHSA-mq6v-w35g-3c97: Zmarkdown Local File Inclusion Vulnerability Vulnerability

LOW
Published
Advisory Summary

GHSA-mq6v-w35g-3c97 is a LOW local file inclusion vulnerability vulnerability (General Security Weakness) affecting Zmarkdown libraries in the npm ecosystem. The issue involves local file inclusion vulnerability in zmarkdown. Remediation is available by upgrading affected packages to version 10.1.3.

GHSA-mq6v-w35g-3c97 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-mq6v-w35g-3c97
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Zmarkdown
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-mq6v-w35g-3c97

To remediate this vulnerability, upgrade all affected Zmarkdown dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

zmarkdown fixed: 10.1.3
npm install zmarkdown@10.1.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls zmarkdown

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-mq6v-w35g-3c97, inspect your project dependencies using npm:

npm ls zmarkdown

Analyze the terminal output to locate any version of Zmarkdown in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.1.3), your application is affected.

Note: The npm ls zmarkdown command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Zmarkdown, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: ```markdown ![](/tmp/img.png) ``` 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](https://github.com/zestedesavoir/zmarkdown/issues).

GHSA-mq6v-w35g-3c97 Affected Zmarkdown Versions

1 component(s)
Fixed Versions:
10.1.3
Product / Package Ecosystem Affected Versions Fixed Version
zmarkdown
npm
< 10.1.3
10.1.3

References

Frequently Asked Questions

What is GHSA-mq6v-w35g-3c97?
GHSA-mq6v-w35g-3c97 is a security vulnerability in Zmarkdown involving Local File Inclusion vulnerability in zmarkdown under General Security Weakness.
Which Zmarkdown versions are affected?
Affected versions include releases prior to 10.1.3 across affected packages: zmarkdown.
What version fixes GHSA-mq6v-w35g-3c97?
Upgrading to 10.1.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zmarkdown affected?
Yes, zmarkdown is affected in releases prior to 10.1.3. Upgrade your dependency to 10.1.3 or later.
What CWE is associated with GHSA-mq6v-w35g-3c97?
GHSA-mq6v-w35g-3c97 is classified under General Security Weakness.
How can I check npm dependencies for GHSA-mq6v-w35g-3c97?
Run the dependency tree command: 'npm ls zmarkdown'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mq6v-w35g-3c97",
  "modified" : "2024-05-14T22:01:12Z",
  "published" : "2024-02-03T00:37:56Z",
  "aliases" : [ ],
  "summary" : "Local File Inclusion vulnerability in zmarkdown",
  "details" : "### Impact\n\nA minor Local File Inclusion vulnerability has been found in\n`zmarkdown`, which allowed for images with a known path on\nthe host machine to be included inside a LaTeX document.\n\nTo prevent it, a new option has been created that allow to replace\ninvalid paths with a default image instead of linking the image on the\nhost directly. `zmarkdown` has been updated to make this setting the\ndefault.\n\nEvery user of `zmarkdown` is likely impacted, except if\ndisabling LaTeX generation or images download. Here\nis an example of including an image from an invalid path:\n\n```markdown\n![](/tmp/img.png)\n```\n\nWill effectively redownload and include the image\nfound at `/tmp/img.png`.\n\n### Patches\n\nThe vulnerability has been patched in version 10.1.3.\nIf impacted, you should update to this version as soon as possible.\n\n### Workarounds\n\nDisable images downloading, or sanitize paths.\n\n### For more information\n\nIf you have any questions or comments about this advisory, open an issue in [ZMarkdown](https://github.com/zestedesavoir/zmarkdown/issues).\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "zmarkdown"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/zestedesavoir/zmarkdown/security/advisories/GHSA-mq6v-w35g-3c97"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zestedesavoir/zmarkdown"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-03T00:37:56Z",
    "nvd_published_at" : null
  }
}