laradocs KaTeX SSR command injection depends on a trusted path, and that is why it matters
laradocs shipped a command injection issue in its optional server-side KaTeX renderer. The affected code built a shell command with a Node.js binary path that was not passed through escapeshellarg().
The vulnerability is CVE-2026-65973. Affected versions are 0.4.0 through 0.9.x, with 1.0.0 patched. GitHub rates the advisory Moderate. The maintainer's description also calls the practical severity Low because the value comes from configuration or PATH, not directly from an HTTP request.
That context matters. This is not a case where a document author can type a shell command into Markdown and get execution. The deployment has to enable SSR and allow an untrusted party to control laradocs.parser.katex.node_bin or the process PATH. If either condition already holds, the attacker has a strong position on the host.
The finding still deserves attention because configuration and process environment are common weak points. A package installed by a tenant, a writable directory placed at the front of PATH, or an environment value copied from a deployment template can turn a hardening issue into a real execution path.
Where the command string is built
The renderer reads the configured Node binary, then appends a temporary file and input argument through proc_open(). The temporary file and input argument are escaped. The binary is not. A path containing shell metacharacters can therefore alter the command that the shell parses.
This is a narrow mistake with a clear repair: treat the executable as an argument, avoid an intermediate shell where possible, or escape the path and validate that it resolves to an approved executable. Upgrade to laradocs 1.0.0 or later. If SSR is not required, disable it.
Controls that survive future bugs
The production control should be independent of the package version. Run document rendering in a process with a fixed executable search path. Do not let tenant configuration set a binary path. Mount the Node binary from a read-only image and reject a path that is not an absolute approved file. Run the renderer as an unprivileged user with no access to application secrets or the main data directory.
Review which accounts can change PATH and configuration. In container platforms, compare the running process environment with the committed deployment manifest. In virtual machines, inspect shell profiles, service unit files, web-server environment blocks and package-owned wrapper scripts. A differential review can reveal a value that was added for convenience and never removed.
Use a test that supplies a harmless path with a shell metacharacter and verifies that the process still attempts to run that exact file or fails closed. Do not use a destructive payload. The goal is to prove that the application is not invoking a shell string.
Incident review if the condition was reachable
If an untrusted party could alter the binary path or PATH, treat host command execution as possible. Review process trees, shell history where retained, web-worker child processes and files created by the renderer. Check package directories and writable bind mounts for unexpected executables. Rotate credentials that were readable by the web worker, then rebuild the host from a trusted image if the evidence points to execution.
The maintainer's low-impact framing is useful, but it should lead to a concrete review. A trusted input can still be the wrong input when the deployment boundary has drifted.
