6.4medium
Laradocs: Command injection via unescaped Node.js binary path in KaTeX SSR
- Severity
- 6.4medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.63% (higher than 45% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-h746-qpxh-ph7g
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| PeteBishwhip laradocs | >= 0.4.0, < 1.0.0 | CVE List |
| petebishwhip/laradocs (Packagist) | from 0.4.0 before 1.0.0 | GitHub Advisory Database |
All scores
| GitHub_M | 6.4medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 6.4medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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).
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-65973 changed 2026-11-16 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-h746-qpxh-ph7g changed 2026-11-25 | CC-BY-4.0 |
| NVD | CVE-2026-65973 changed 2026-11-16 | Public domain |