/

CVE-2026-38595

Severity:

CRITICAL RISK

(9.8)

OS Command Injection (CWE-78) in im3x Scriptables /sync

CVE-2026-38595

Received

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-22, CWE-78

Impact:

Arbitrary OS Command Execution

Severity:

CRITICAL RISK

(9.8)

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

im3x Scriptables through the v2-dev branch has a command-injection issue in its /sync endpoint. If an attacker can upload a file with a crafted filename, the filename may be interpreted as part of an operating-system command, potentially allowing command execution.

im3x Scriptables through the v2-dev branch has a command-injection issue in its /sync endpoint. If an attacker can upload a file with a crafted filename, the filename may be interpreted as part of an operating-system command, potentially allowing command execution.

Affected context

The issue is associated with file uploads handled by the /sync endpoint in im3x Scriptables through the v2-dev branch. It becomes risky when a crafted filename is incorporated into an operating-system command without adequate separation or validation. The available description does not establish whether authentication or other deployment-specific controls limit access to the endpoint.

The issue is associated with file uploads handled by the /sync endpoint in im3x Scriptables through the v2-dev branch. It becomes risky when a crafted filename is incorporated into an operating-system command without adequate separation or validation. The available description does not establish whether authentication or other deployment-specific controls limit access to the endpoint.

Exploit preconditions

  • Attack surface: The /sync file-upload endpoint
  • Required access: Ability to submit a file to the endpoint; authentication requirements depend on deployment configuration
  • Trigger point: Processing an uploaded file with a crafted filename
  • Why exploitation is possible: The filename may reach an OS command in a way that allows command syntax to be interpreted
  • Attack surface: The /sync file-upload endpoint
  • Required access: Ability to submit a file to the endpoint; authentication requirements depend on deployment configuration
  • Trigger point: Processing an uploaded file with a crafted filename
  • Why exploitation is possible: The filename may reach an OS command in a way that allows command syntax to be interpreted

Why this happens

The underlying issue is improper neutralization of special elements in a value used to construct or invoke an operating-system command. If an uploaded filename is passed through a shell or otherwise treated as command syntax, attacker-controlled input can alter the command's behavior. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command. CWE-22 is also associated with the report, but the described behavior specifically concerns command injection.

The underlying issue is improper neutralization of special elements in a value used to construct or invoke an operating-system command. If an uploaded filename is passed through a shell or otherwise treated as command syntax, attacker-controlled input can alter the command's behavior. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command. CWE-22 is also associated with the report, but the described behavior specifically concerns command injection.

Potential impact

  • An attacker may execute commands with the privileges of the application process.
  • The application or its host environment could be compromised.
  • Accessible files or data may be exposed, altered, or deleted.
  • Further disruption or lateral movement could be possible, depending on the environment and process privileges.
  • An attacker may execute commands with the privileges of the application process.
  • The application or its host environment could be compromised.
  • Accessible files or data may be exposed, altered, or deleted.
  • Further disruption or lateral movement could be possible, depending on the environment and process privileges.

General mitigation guidance

Mitigation generally focuses on avoiding shell interpretation of untrusted values and limiting the authority of processes that handle uploads.

  • Prefer APIs that pass arguments directly to a process without invoking a shell.
  • Treat filenames as untrusted data; apply strict validation and use server-generated names where appropriate.
  • Keep uploaded files separate from command construction and processing logic.
  • Apply least privilege to the application process and restrict its access to files and system resources.
  • Enforce upload controls and security checks at the endpoint and deployment boundaries.

Mitigation generally focuses on avoiding shell interpretation of untrusted values and limiting the authority of processes that handle uploads.

  • Prefer APIs that pass arguments directly to a process without invoking a shell.
  • Treat filenames as untrusted data; apply strict validation and use server-generated names where appropriate.
  • Keep uploaded files separate from command construction and processing logic.
  • Apply least privilege to the application process and restrict its access to files and system resources.
  • Enforce upload controls and security checks at the endpoint and deployment boundaries.

How teams detect issues like this

Review upload-handling code for filenames or other request data flowing into shell commands, process invocation, or command-building utilities. Static analysis can flag shell execution APIs and unsanitized input flows; code review can check whether process arguments are passed without shell interpretation and whether filenames are normalized or replaced. Policy checks may restrict shell-based process execution in upload-handling components, and automated code review tools can help identify suspicious patterns.

Review upload-handling code for filenames or other request data flowing into shell commands, process invocation, or command-building utilities. Static analysis can flag shell execution APIs and unsanitized input flows; code review can check whether process arguments are passed without shell interpretation and whether filenames are normalized or replaced. Policy checks may restrict shell-based process execution in upload-handling components, and automated code review tools can help identify suspicious patterns.

Sources

SourceLink
github.comgithub.com/Den-Sec/security-research/blob/master/advisories/gohttpserver/VDR-001-zipslip.md
github.comgithub.com/Den-Sec/security-research/blob/master/advisories/im3x-scriptables/VDR-003-os-command-injection.md
github.comgithub.com/im3x/Scriptables
github.comgithub.com/im3x/Scriptables/blob/v2-dev/app.js

Frequently asked

questions

The described attack surface is the /sync upload endpoint, so exploitation may be possible over the network if that endpoint is reachable. Actual exposure depends on deployment and access controls.

An attacker needs the ability to submit a file to /sync. The description does not specify whether authentication is required.

Avoid passing attacker-controlled filenames through a shell. Use direct process APIs where needed, and keep filenames out of command construction.

Treat filenames as untrusted input, use server-generated names where practical, review data flows into process execution, and run upload-processing components with minimal privileges.

The described attack surface is the /sync upload endpoint, so exploitation may be possible over the network if that endpoint is reachable. Actual exposure depends on deployment and access controls.

An attacker needs the ability to submit a file to /sync. The description does not specify whether authentication is required.

Avoid passing attacker-controlled filenames through a shell. Use direct process APIs where needed, and keep filenames out of command construction.

Treat filenames as untrusted input, use server-generated names where practical, review data flows into process execution, and run upload-processing components with minimal privileges.

Find out what's already
exploitable in your codebase.