Ocaml: Windows command execution via filename quotes. (CVE-2026-41083)
Affects ocamlSource GCVE Database
Not known to be exploited · CVSS 6.1 Medium · fixed in 4.14.4 : update ocaml when convenient.
Data as of 09/10/2026, 13:26:21 UTC
- Patch
- Available – fixed in 4.14.4, 5.5.0, ce6d0f7b67145debec57e296dcc49d8619259198 +2
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 18 Jun 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wild: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Patches and advisories
Affected software
| Product | Affected | Fixed in |
|---|---|---|
opamocamlpkg:opam/ocamlOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
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.
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.
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.
Summary
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.