21 matches found
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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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...
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-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-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...