GHSA-H746-QPXH-PH7G

Vulnerability from github – Published: 2026-11-25 19:41 – Updated: 2026-11-25 19:41
VLAI
Summary
laradocs Command injection via unescaped Node.js binary path in KaTeX SSR
Details

Summary

Local command injection (CWE-78) in server-side KaTeX rendering via an unescaped Node.js binary path in a proc_open() command string.

Affected versions

= 0.4.0, < 1.0.0

Patched versions

= 1.0.0 (fixed in commit 100cb1e)

Impact

When rendering KaTeX math server-side, Laradocs invoked Node via proc_open() with a command string in which the Node binary argument was not passed through escapeshellarg().

MarkdownPipelineFactory constructs KatexExtension with the configured binary, which the render path resolved as:

$node = $this->nodeBin ?? 'node';
$cmd = $node . ' ' . escapeshellarg($tmpFile) . ' ' . escapeshellarg($input);

$this->nodeBin comes from Config::nullableString('laradocs.parser.katex.node_bin'). Both possible sources — the configured node_bin value, or the 'node' default resolved from PATH — are operator-controlled. Neither is derived from untrusted request data or documentation content.

The vulnerable branch is reached only when server-side rendering is enabled. The default KaTeX path is client-side (browser-rendered via the configured js/css assets) and never calls proc_open(). SSR is opt-in via laradocs.parser.katex.ssr, which ships disabled.

Exploit scenario

Exploitation requires SSR to be turned on and an untrusted party to control laradocs.parser.katex.node_bin or the process PATH — a precondition that on its own already implies code execution on the host.

Severity

Low. This is best treated as a hardening / defence-in-depth fix rather than a remotely exploitable RCE, since no untrusted input (request data, documentation content, or network input) reaches the vulnerable code path under normal operation.

Patch

The Node binary argument is now passed through escapeshellarg() like the other command components:

$cmd = escapeshellarg($node) . ' ' . escapeshellarg($tmpFile) . ' ' . escapeshellarg($input);

Credit

Reported via automated security scanning (Aikido).

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "petebishwhip/laradocs"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.4.0"
            },
            {
              "fixed": "1.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-65973"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-78"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-25T19:41:53Z",
    "nvd_published_at": "2026-11-11T21:16:46Z",
    "severity": "MODERATE"
  },
  "details": "### Summary\nLocal command injection (CWE-78) in server-side KaTeX rendering via an unescaped Node.js binary path in a `proc_open()` command string.\n\n### Affected versions\n\u003e= 0.4.0, \u003c 1.0.0\n\n### Patched versions\n\u003e= 1.0.0 (fixed in commit `100cb1e`)\n\n### Impact\nWhen rendering KaTeX math **server-side**, Laradocs invoked Node via `proc_open()` with a command string in which the Node binary argument was not passed through `escapeshellarg()`.\n\n`MarkdownPipelineFactory` constructs `KatexExtension` with the configured binary, which the render path resolved as:\n\n```php\n$node = $this-\u003enodeBin ?? \u0027node\u0027;\n$cmd = $node . \u0027 \u0027 . escapeshellarg($tmpFile) . \u0027 \u0027 . escapeshellarg($input);\n```\n\n`$this-\u003enodeBin` comes from `Config::nullableString(\u0027laradocs.parser.katex.node_bin\u0027)`. Both possible sources \u2014 the configured `node_bin` value, or the `\u0027node\u0027` default resolved from `PATH` \u2014 are operator-controlled. Neither is derived from untrusted request data or documentation content.\n\nThe vulnerable branch is reached only when server-side rendering is enabled. The default KaTeX path is client-side (browser-rendered via the configured `js`/`css` assets) and never calls `proc_open()`. SSR is opt-in via `laradocs.parser.katex.ssr`, which ships **disabled**.\n\n### Exploit scenario\nExploitation requires SSR to be turned on **and** an untrusted party to control `laradocs.parser.katex.node_bin` or the process `PATH` \u2014 a precondition that on its own already implies code execution on the host.\n\n### Severity\n**Low.** This is best treated as a hardening / defence-in-depth fix rather than a remotely exploitable RCE, since no untrusted input (request data, documentation content, or network input) reaches the vulnerable code path under normal operation.\n\n### Patch\nThe Node binary argument is now passed through `escapeshellarg()` like the other command components:\n\n```php\n$cmd = escapeshellarg($node) . \u0027 \u0027 . escapeshellarg($tmpFile) . \u0027 \u0027 . escapeshellarg($input);\n```\n\n### Credit\nReported via automated security scanning (Aikido).",
  "id": "GHSA-h746-qpxh-ph7g",
  "modified": "2026-11-25T19:41:53Z",
  "published": "2026-11-25T19:41:53Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/PeteBishwhip/laradocs/security/advisories/GHSA-h746-qpxh-ph7g"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-65973"
    },
    {
      "type": "WEB",
      "url": "https://github.com/PeteBishwhip/laradocs/commit/100cb1e83920b8d3c9d8d53f98712df80df99435"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/PeteBishwhip/laradocs"
    },
    {
      "type": "WEB",
      "url": "https://github.com/PeteBishwhip/laradocs/releases/tag/v1.0.0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "laradocs  Command injection via unescaped Node.js binary path in KaTeX SSR"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

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.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.