{"id":"CVE-2026-65973","aliases":["CVE-2026-65973","GHSA-h746-qpxh-ph7g"],"related":[],"kind":"vulnerability","state":"published","title":"Laradocs: Command injection via unescaped Node.js binary path in KaTeX SSR","summary":"Laradocs maintains version-controlled documentation inside a Laravel codebase. From version 0.4.0 to before version 1.0.0, Laradocs is vulnerable to local command injection in server-side KaTeX rendering via an unescaped Node.js binary path in a proc_open() command string. This issue has been patched in version 1.0.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Laradocs maintains version-controlled documentation inside a Laravel codebase. From version 0.4.0 to before version 1.0.0, Laradocs is vulnerable to local command injection in server-side KaTeX rendering via an unescaped Node.js binary path in a proc_open() command string. This issue has been patched in version 1.0.0.","source":"cvelist"},{"lang":"en","text":"### 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).","format":"markdown","source":"ghsa"}],"published":"2026-11-11T21:02:37.019Z","modified":"2026-11-25T19:45:03.992Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.4,"rating":"MEDIUM"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":">= 0.4.0, < 1.0.0","status":"affected"}],"vendor":"PeteBishwhip","product":"laradocs","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.4.0","status":"affected","fixed":"1.0.0"}],"ecosystem":"Packagist","package":"petebishwhip/laradocs","purl":"pkg:composer/petebishwhip/laradocs","source":"ghsa"}],"references":[{"url":"https://github.com/PeteBishwhip/laradocs/security/advisories/GHSA-h746-qpxh-ph7g","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/PeteBishwhip/laradocs/releases/tag/v1.0.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65973","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/PeteBishwhip/laradocs/commit/100cb1e83920b8d3c9d8d53f98712df80df99435","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/PeteBishwhip/laradocs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-11-16T18:39:53.926Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-65973","url":"https://www.cve.org/CVERecord?id=CVE-2026-65973","licence":"CVE Terms of Use","modified":"2026-11-16T18:40:04.367Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h746-qpxh-ph7g","url":"https://github.com/advisories/GHSA-h746-qpxh-ph7g","licence":"CC-BY-4.0","modified":"2026-11-25T19:45:03.992Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-65973","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65973","licence":"Public domain","modified":"2026-11-16T19:17:51.910Z"}],"updatedAt":"2026-11-25T22:59:50.424Z","epss":{"score":0.0063,"percentile":0.44704,"date":"2026-11-30T12:00:22.000Z"}}