{"id":"CVE-2026-65973","aliases":["GHSA-h746-qpxh-ph7g"],"url":"https://o3.security/vulnerability/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).","published":"2026-11-11T21:02:37.019Z","modified":"2026-11-18T21:02:09.810213225Z","cvss":{"score":6.4,"severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H"},"epss":{"score":0.00468,"percentile":0.41038,"asOf":"2026-11-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"petebishwhip/laradocs","fixedVersion":"1.0.0"}],"fix":{"url":"https://github.com/PeteBishwhip/laradocs/commit/100cb1e83920b8d3c9d8d53f98712df80df99435","label":"PeteBishwhip/laradocs@100cb1e"},"references":[{"type":"WEB","url":"https://github.com/PeteBishwhip/laradocs/releases/tag/v1.0.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65973.json"},{"type":"ADVISORY","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"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-18T21:02:09.810213225Z"}}