Skip to main content
Reconnecting to live updates…

Ocaml: Windows command execution via filename quotes. (CVE-2026-41083)

0
Medium
VulnerabilityCVE-2026-41083gcveosvosec-2026-05cve-2026-41083opam
Published: 06/18/2026 (06/18/2026, 13:45:00 UTC)
Source: GCVE Database
Product: ocaml

Description

A vulnerability in OCaml on Windows allows command injection via improper quoting of stdin/stdout/stderr filenames. The function Filename.quote_command does not sufficiently escape the '&' character, enabling an attacker to inject shell commands if they can control these file descriptors. This issue affects multiple OCaml versions prior to 4.14.4 and certain 5.x versions. A fix has been released in OCaml 4.14.4.

CVSS v3.1

Score 6.1medium

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N

Affected software

ocaml
pkg:opam/ocaml
Affected versions
<4.14.4>=5 <5.5.0<ce6d0f7b67145debec57e296dcc49d8619259198<39d3f110eab62ab9f3013bb5f084af2dc3e3bb08<d5c65dc0034fbd75f10c6b54028e8b2740a7b189=3.07=3.07+1=3.07+2=3.08.0=3.08.1=3.08.2=3.08.3=3.08.4=3.09.0=3.09.1=3.09.2=3.09.3=3.10.0=3.10.1=3.10.2=3.11.0=3.11.1=3.11.2=3.12.0=3.12.1=4.00.0=4.00.1=4.01.0=4.02.0=4.02.1=4.02.2=4.02.3=4.02.4=4.03.0=4.03.1=4.04.0=4.04.1=4.04.2=4.04.3=4.05.0=4.05.1=4.06.0=4.06.1=4.06.2=4.07.0=4.07.1=4.07.2=4.08.0=4.08.1=4.08.2=4.09.0=4.09.1=4.09.2=4.10.0=4.10.1=4.10.2=4.10.3=4.11.0=4.11.1=4.11.2=4.11.3=4.12.0=4.12.1=4.12.2=4.13.0=4.13.1=4.13.2=4.14.0=4.14.1=4.14.2=4.14.3=5.0.0=5.0.1=5.1.0=5.1.1=5.1.2=5.2.0=5.2.1=5.2.2=5.3.0=5.3.1=5.4.0=5.4.1=5.4.2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/10/2026, 13:26:21 UTC

Technical Analysis

The vulnerability (CVE-2026-41083) arises because the quoting mechanism used by OCaml's Filename.quote_command on Windows does not properly escape the '&' character. This allows an attacker who can specify the stdin, stdout, or stderr of a program to inject additional shell commands. The advisory includes an example where an attacker uses the '&' character in a filename to execute the 'tasklist' command. The issue was reported in April 2026 and fixed in OCaml 4.14.4, with the fix merged in June 2026.

Potential Impact

An attacker able to control the stdin, stdout, or stderr parameters of a program executed via Filename.quote_command on Windows can execute arbitrary shell commands. This can lead to unauthorized command execution with the privileges of the OCaml process. The CVSS score is 6.1 (medium severity), reflecting local attack vector with low complexity and no user interaction required, impacting confidentiality and integrity.

Mitigation Recommendations

A patch is available and has been released in OCaml version 4.14.4. Users should upgrade to version 4.14.4 or later to remediate this vulnerability. The fix is documented in the official OCaml pull request https://github.com/ocaml/ocaml/pull/14853. No additional mitigations are indicated by the vendor advisory.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
OSEC-2026-05
Osv Schema Version
1.7.4
Aliases
["CVE-2026-41083"]
Ecosystems
["opam"]
Database Specific Severity
null
Cvss Version
3.1

Threat ID: 6aa2af57acd9273b4925a2df

Added to database: 09/10/2026, 13:23:35 UTC

Last enriched: 09/10/2026, 13:26:21 UTC

Last updated: 09/10/2026, 15:25:28 UTC

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses