/

CVE-2026-117511

Severity:

HIGH RISK

(7.3)

OS Command Injection (CWE-78) in node-tesseract CLI

CVE-2026-117511

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A high-severity command injection vulnerability affects the node-tesseract Command Builder, where the image argument is incorporated into a process invocation without sufficient protection.

An attacker who can reach the affected functionality may influence operating system command execution remotely, potentially running unauthorized commands with the privileges of the application.

A high-severity command injection vulnerability affects the node-tesseract Command Builder, where the image argument is incorporated into a process invocation without sufficient protection.

An attacker who can reach the affected functionality may influence operating system command execution remotely, potentially running unauthorized commands with the privileges of the application.

Affected context

The vulnerability occurs in the process function within lib/tesseract.js when the Command Builder handles attacker-influenced image arguments. It is relevant when untrusted or insufficiently validated input can reach the command-construction path and the application executes the resulting command through an operating system shell or equivalent process mechanism.

The vulnerability occurs in the process function within lib/tesseract.js when the Command Builder handles attacker-influenced image arguments. It is relevant when untrusted or insufficiently validated input can reach the command-construction path and the application executes the resulting command through an operating system shell or equivalent process mechanism.

Exploit preconditions

  • Attack surface: The remotely reachable application functionality that invokes node-tesseract.
  • Required access: The attacker must be able to submit or influence an image-related argument accepted by the application.
  • Trigger point: Processing the supplied argument through the Command Builder's process function.
  • Why exploitation is possible: Input is incorporated into an operating system command without reliably separating data from command syntax.
  • Attack surface: The remotely reachable application functionality that invokes node-tesseract.
  • Required access: The attacker must be able to submit or influence an image-related argument accepted by the application.
  • Trigger point: Processing the supplied argument through the Command Builder's process function.
  • Why exploitation is possible: Input is incorporated into an operating system command without reliably separating data from command syntax.

Why this happens

The underlying bug is an unsafe command-construction pattern in which externally influenced input is passed into an operating system process invocation without robust argument separation and validation.

This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection. It is also related to CWE-77: Improper Neutralization of Special Elements in Output Used by a Downstream Component, because data intended as an image argument can be interpreted as command syntax by a downstream command interpreter.

The underlying bug is an unsafe command-construction pattern in which externally influenced input is passed into an operating system process invocation without robust argument separation and validation.

This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection. It is also related to CWE-77: Improper Neutralization of Special Elements in Output Used by a Downstream Component, because data intended as an image argument can be interpreted as command syntax by a downstream command interpreter.

Potential impact

  • An attacker may execute arbitrary operating system commands.
  • The application process or host may be compromised.
  • Sensitive files, credentials, or environment data could be exposed.
  • The vulnerability could enable unauthorized modification or deletion of application data.
  • A compromised process may be used for lateral movement or further attacks.
  • An attacker may execute arbitrary operating system commands.
  • The application process or host may be compromised.
  • Sensitive files, credentials, or environment data could be exposed.
  • The vulnerability could enable unauthorized modification or deletion of application data.
  • A compromised process may be used for lateral movement or further attacks.

General mitigation guidance

Mitigation generally focuses on keeping user-controlled data separate from executable command structure.

Common defensive patterns include:

  • Prefer direct process APIs that pass arguments as a structured list without invoking a shell.
  • Apply strict allowlists and type validation to image paths or identifiers.
  • Reject unexpected separators, control characters, and shell metacharacters where such input is not required.
  • Avoid constructing command strings through concatenation or interpolation.
  • Run image-processing operations with a dedicated low-privilege account or sandbox.
  • Minimize filesystem, network, and process permissions available to the command-running component.
  • Use secure-by-default wrappers that treat all external values as data rather than executable syntax.

Mitigation generally focuses on keeping user-controlled data separate from executable command structure.

Common defensive patterns include:

  • Prefer direct process APIs that pass arguments as a structured list without invoking a shell.
  • Apply strict allowlists and type validation to image paths or identifiers.
  • Reject unexpected separators, control characters, and shell metacharacters where such input is not required.
  • Avoid constructing command strings through concatenation or interpolation.
  • Run image-processing operations with a dedicated low-privilege account or sandbox.
  • Minimize filesystem, network, and process permissions available to the command-running component.
  • Use secure-by-default wrappers that treat all external values as data rather than executable syntax.

How teams detect issues like this

Detection can include static analysis for shell execution APIs, string interpolation, concatenation, or template construction near process-spawning code. Code review should examine every path by which request data reaches command builders, especially image names, paths, and options.

Runtime monitoring can look for unexpected child processes, shell interpreters, abnormal command arguments, and execution initiated by the application service account. CI policy checks and automated code review tools can flag unsafe process invocation patterns and missing input validation.

Detection can include static analysis for shell execution APIs, string interpolation, concatenation, or template construction near process-spawning code. Code review should examine every path by which request data reaches command builders, especially image names, paths, and options.

Runtime monitoring can look for unexpected child processes, shell interpreters, abnormal command arguments, and execution initiated by the application service account. CI policy checks and automated code review tools can flag unsafe process invocation patterns and missing input validation.

Sources

SourceLink
github.comgithub.com/desmondmorris/node-tesseract/
github.comgithub.com/desmondmorris/node-tesseract/issues/72
vuldb.comvuldb.com/cve/CVE-2026-117511
vuldb.comvuldb.com/submit/1024535
vuldb.comvuldb.com/vuln/427077
vuldb.comvuldb.com/vuln/427077/cti

Frequently asked

questions

Yes. The reported issue indicates remote exploitability when a remotely reachable feature allows attacker-controlled input to reach the vulnerable command-building path.

The attacker needs access to an interface or workflow that accepts or influences the image argument processed by node-tesseract. The exact authentication requirement depends on the surrounding application.

Avoid shell-based command construction and invoke the intended program through a structured argument API. Validate inputs with a narrowly defined allowlist before passing them to the process.

Combine secure process APIs, strict input validation, least-privilege execution, code review, static analysis, and runtime monitoring for unexpected child-process behavior.

Yes. The reported issue indicates remote exploitability when a remotely reachable feature allows attacker-controlled input to reach the vulnerable command-building path.

The attacker needs access to an interface or workflow that accepts or influences the image argument processed by node-tesseract. The exact authentication requirement depends on the surrounding application.

Avoid shell-based command construction and invoke the intended program through a structured argument API. Validate inputs with a narrowly defined allowlist before passing them to the process.

Combine secure process APIs, strict input validation, least-privilege execution, code review, static analysis, and runtime monitoring for unexpected child-process behavior.

Find out what's already
exploitable in your codebase.