29 matches found
OSEC-2026-06 TLS-client (with TLS 1.3) does insufficient certificate checks (missing KeyUsage and ExtendedKeyUsage validation)
The ocaml-TLS 1.3 client does not validate the KeyUsage and ExtendedKeyUsage extensions of the server certificate. This can lead to impersonation with a certificate issued to a client. Scenario Every employee at a major bank carries a smart card. The card holds a clientAuth certificate issued by...
OSEC-2026-07 TLS-server does insufficient client certificate checks (missing KeyUsage and ExtendedKeyUsage validation)
The TLS server implementation does not validate the KeyUsage and ExtendedKeyUsage extensions of client certificates when mutually authenticated TLS is requested. This can lead to impersonation with a certificate issued to a server. Scenario An operations engineer enables mTLS on the admin endpoin...
OSEC-2026-08 Path traversal vulnerability in ocaml-tar
A malicious archive with ../ path segments in its name allows escaping the current working directory. This is not desired behavior, and tar1 rejects such extractions, but ocaml-tar decompresses it anyway. The impact is that it allows arbitrary file write outside of the desired extraction director...
OSEC-2026-09 Albatross-console memory exhaustion
Albatross-console doesn't properly terminate when looping over the ringbuffer. This leads to denial of service and memory exhaustion. Scenario A user that has access to albatross-console either via the unix domain socket requires root:albatross by default or via albatross-tls-endpoint requires a...
OSEC-2026-11 Out of order segment reassembly allows remote denial of service
A remote peer that completes a normal TCP handshake can send a stream of small out-of-order segments that never fill the gap at rcvnxt. utcp keeps one reassembly entry per segment bounded per connection only by the receive window, about 65000 one-byte entries and re-folds the whole queue on every...
OSEC-2026-12 AEAD `decrypt_into` functions writes plaintext before checking the tag
On the generic GCM path, AES.GCM.authenticatedecryptinto as well as Chacha20.authenticatedecryptinto and AES.CCM16.authenticatedecryptinto writes the decrypted plaintext into the caller's destination buffer and only then compares the tag. On a forged tag the function returns false, but the...
OSEC-2026-16 Path traversal in Cohttp.Path.resolve_local_file
The issue is that the function normalizes the URI path before percent decoding it: OCaml let resolvelocalfile docroot uri = let path = Uri.pctdecode path resolve "http" ofstring "/" uri in ... Because %2f is decoded after Uri.resolve, encoded separators survive dot-segment normalization. For...
OSEC-2026-15 EC public key out of bounds read
The internal Point.ofoctets function is missing a length check for compressed points, and thus is raising an exception when a short buffer is provided. This affects all NIST curves P-256, P-384, P-521 and both Dsa.pubofoctets and Dh.keyexchange functions. Fix The fix is to check the length of the...
OSEC-2026-14 RSA signature verification raises undocumented exception
The RSA decrypt and encrypt functions raise an Invalidargument exception if the message is smaller than 2. This leads to X509 certificates with a signature value of 0 or 1 to throw this Invalidargument exception instead of a proper error. Fix The fix is to reuse the Insufficientkey exception, whi...
OSEC-2026-13 ECDSA accepts the point at infinity as a P256, P384, P521 public key
P256,P384,P521.Dsa.pubofoctets accepts 0x00, the encoding of the point at infinity, as a public key. The Diffie-Hellman path rejects that point pointofoctets; the ECDSA path skips the same check. Under such a key a signature can be forged with no private key, as the repro shows. The same class is...
OSEC-2026-02 ARP unbounded memory usage
Background Mirage's implementation of the ARP protocol RFC826 caches ARP replies to construct an IPv4 address - MAC address cache. This cache is long-lived effectively global, and also contains pending ARP requests, which are replaced by the reply, or deleted after a timeout. ARP replies that do...
OSEC-2022-01 Infinite loop in console output on xen
Background MirageOS is a library operating system using cooperative multitasking, which can be executed as a guest of the Xen hypervisor. Output on the console is performed via the Xen console protocol. Problem Description Since MirageOS moved from PV mode to PVH, and thus replacing Mini-OS with...
OSEC-2026-19 JOSE: missing RSA signature verification
The opam package "jose" does not validate any RSA signature. It checks the encoding being PKCS1, but does not verify with the public key. Reproduction With jose 0.10.0, the code below signs two tokens with the same key and glues one's payload onto the other's signature: OCaml let =...
OSEC-2026-01 Buffer Over-Read in OCaml Marshal Deserialization
Summary A critical buffer over-read vulnerability in OCaml's Marshal deserialization runtime/intern.c enables remote code execution through a multi-phase attack chain. The vulnerability stems from missing bounds validation in the readblock function, which performs unbounded memcpy operations usin...
OSEC-2026-20 Cstruct indexing bugs can corrupt filtered output and reverse parsing results
Several functions in cstruct may use wrong data, leading to unexpected exceptions and return corrupted data. Impact - Cstruct.filtermap writes retained bytes at their original input positions, producing corrupted output when earlier bytes are dropped. - Cstruct.tail rev:true removes two bytes...
OSEC-2026-10 opam install sandbox escape using symlinks
Summary Installing files through .install files do not check symlinks resolution of the target path, and so can bypass sandboxing. Exploit Let's imagine a test package whose test.install file looks like the following: shareroot: "test" "blah/pwnd" and test.opam file: opam-version: "2.0" install:...
OSEC-2026-04 Bigarray.reshape integer overflow
The function camlbareshape, part of the OCaml runtime in runtime/bigarray.c, had a missing check for integer overflow when computing the size to be allocated. This leads to a segmentation fault. Any application using Bigarray.reshape or reshapeN with untrusted and unchecked input can result in a...
OSEC-2026-03 opam install sandbox escape
Summary .install files do not validate whether they are inside the package area, and so can bypass sandboxing. Exploit In a package.install file, this installs a file as /.bashrc: bin: "payload.sh" "../../../.bashrc" Timeline - 2026-04-11: Anil forwarded the issue from Andrew Nesbitt to the OCaml...
OSEC-2026-05 Windows command execution via filename quotes.
The quoting of stdin/stdout/stderror using Filename.quotecommand on Windows is not sufficient, and allows the & character to be passed through. This allows an attacker to inject a shell command if they can specify the stdin/stdout/stderr of a program to be executed. Exploit bash $ opam exec --...
OSEC-2026-17 Timing leak in NIST elliptic curves scalar multiplication
The scalar multiplication includes pre-computed tables for speedup introduced in mirage-crypto-ec 0.11.3. The lookup algorithm for these tables performs secret-dependent reads instead of scanning the entire table. Solution Instead of using the index n - 1, where n is secret-dependent, use i - 1, ...
OSEC-2025-01 Albatross console out of memory
Background Albatross-console reads the console output from multiple unikernel tenders solo5-hvt. This console output can be retrieved using albatross-client. The console protocol is fairly simple: the unikernel invokes a PUTS hypercall, which sends arbitrary bytes of given length to the unikernel...
OSEC-2018-01 An integer overflow in the `bigarray` serialization module leads to arbitrary code execution
Bug description The bigarray module in all recent ocaml versions is capable of reading in serialized marshalled objects from a external source which is often used for network operations and interprocess communication. byterun/bigarray.c Line 458 in ea60609 C b-data = malloceltsize numelts; A...
OSEC-2017-01 Local privilege escalation issue with ocaml binaries
Description Insufficient sanitisation in the OCaml compiler versions 4.04.0 and 4.04.1 allows external code to be executed with raised privilege in binaries marked as setuid, by setting the CAMLCPLUGINS, CAMLNATIVECPLUGINS, or CAMLBYTECPLUGINS environment variable...
OSEC-2023-01 Time of check time of use issue in opam's cache
Bug description Opam uses since version 2.0.0 a download cache: if a source artifact is needed, first its hash is looked up in the local cache /.opam/download-cache//. Opam supports multiple hash algorithms, a cache lookup tries all hash algorithms present in the opam file. Before opam 2.1.5, the...
OSEC-2019-01 Memory disclosure in mirage-net-xen
Background MirageOS is a library operating system using cooperative multitasking, which can be executed as a guest of the Xen hypervisor. Virtual devices, such as a network device, share memory between MirageOS and the hypervisor. To maintain adequate performance, the virtual device managing...
OSEC-2016-02 Memory disclosure in mirage-net-xen
Background MirageOS is a library operating system using cooperative multitasking, which can be executed as a guest of the Xen hypervisor. Virtual devices, such as a network device, share memory between MirageOS and the hypervisor. MirageOS allocates and grants the hypervisor access to a ringbuffe...
OSEC-2016-01 Buffer overflow and information leak in OCaml < 4.03.0
Bug description OCaml versions 4.02.3 and earlier have a runtime bug that, on 64-bit platforms, causes sizes arguments to an internal memmove call to be sign-extended from 32 to 64-bits before being passed to the memmove function. This leads arguments between 2GiB and 4GiB to be interpreted as...
OSEC-2026-18 Marshal integer overflow leads to out-of-heap read
An integer overflow in the length-validation logic of OCaml's Marshal deserializer allows a crafted serialized object to bypass all bounds checks added by the CVE-2026-28364 fix, producing heap out-of-bounds reads from Marshal.frombytes / Marshal.fromstring and the C API camlinputvaluefromblock...
OSEC-2019-02 Grant unshare vulnerability in mirage-xen
Background MirageOS is a library operating system using cooperative multitasking, which can be executed as a guest of the Xen hypervisor. Virtual machines running on a Xen host can communicate by sharing pages of memory. For example, when a Mirage VM wants to use a virtual network device provided...