CVE-2026-65973: Petebishwhip/laradocs Laradocs Command Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-h746-qpxh-ph7g
CVSS 6.4
CWE-78
Published
Advisory Summary

CVE-2026-65973 is a MODERATE (CVSS 6.4) laradocs command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Petebishwhip/laradocs libraries in the Packagist ecosystem. The issue involves laradocs command injection via unescaped node.js binary path in katex ssr. Remediation is available by upgrading affected packages to version 1.0.0.

CVE-2026-65973 at a Glance

CVE Identifier CVE-2026-65973
GHSA Identifier GHSA-h746-qpxh-ph7g
Severity MODERATE
CVSS v3.1 Base Score 6.4
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Petebishwhip/laradocs
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-65973

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

petebishwhip/laradocs fixed: 1.0.0
Upgrade petebishwhip/laradocs to 1.0.0
Verify Direct and Transitive Dependencies

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

inspect dependencies for petebishwhip/laradocs

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-65973, inspect your project dependencies for Petebishwhip/laradocs:

inspect dependencies for petebishwhip/laradocs

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Petebishwhip/laradocs, 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

### 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: ```php $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: ```php $cmd = escapeshellarg($node) . ' ' . escapeshellarg($tmpFile) . ' ' . escapeshellarg($input); ``` ### Credit Reported via automated security scanning (Aikido).

CVE-2026-65973 Affected Petebishwhip/laradocs Versions

1 component(s)
Fixed Versions:
1.0.0
Product / Package Ecosystem Affected Versions Fixed Version
petebishwhip/laradocs
Packagist
≥ 0.4.0
< 1.0.0
1.0.0

References

Frequently Asked Questions

What is CVE-2026-65973?
CVE-2026-65973 is a security vulnerability in Petebishwhip/laradocs involving laradocs Command injection via unescaped Node.js binary path in KaTeX SSR under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Petebishwhip/laradocs versions are affected?
Affected versions include releases prior to 1.0.0 across affected packages: petebishwhip/laradocs.
What version fixes CVE-2026-65973?
Upgrading to 1.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is petebishwhip/laradocs affected?
Yes, petebishwhip/laradocs is affected in releases prior to 1.0.0. Upgrade your dependency to 1.0.0 or later.
What is the CVSS score of CVE-2026-65973?
CVE-2026-65973 has a CVSS v3.1 base score of 6.4 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-65973?
CVE-2026-65973 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check Packagist dependencies for CVE-2026-65973?
Run the dependency tree command: 'inspect dependencies for petebishwhip/laradocs'. 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-h746-qpxh-ph7g",
  "modified" : "2026-11-25T19:41:53Z",
  "published" : "2026-11-25T19:41:53Z",
  "aliases" : [ "CVE-2026-65973" ],
  "summary" : "laradocs  Command injection via unescaped Node.js binary path in KaTeX SSR",
  "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>= 0.4.0, < 1.0.0\n\n### Patched versions\n>= 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->nodeBin ?? 'node';\n$cmd = $node . ' ' . escapeshellarg($tmpFile) . ' ' . escapeshellarg($input);\n```\n\n`$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.\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` — 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) . ' ' . escapeshellarg($tmpFile) . ' ' . escapeshellarg($input);\n```\n\n### Credit\nReported via automated security scanning (Aikido).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "petebishwhip/laradocs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.4.0"
      }, {
        "fixed" : "1.0.0"
      } ]
    } ]
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-25T19:41:53Z",
    "nvd_published_at" : "2026-11-11T21:16:46Z"
  }
}