Skip to content
Heist/ feed
Back to feed
High

ocaml — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-28364

In OCaml before 4.14.3 and 5.x before 5.4.1, a buffer over-read in 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 using attacker-controlled lengths from crafted Marshal data.

Products
ocaml
Affected versions
3.12.1-4ubuntu1, 4.01.0-3ubuntu2, 4.01.0-3ubuntu3, 4.01.0-3ubuntu3.1, 4.01.0-3ubuntu3.1+esm1, 4.01.0-4ubuntu1, 4.02.3-5ubuntu1, 4.02.3-5ubuntu2, 4.02.3-5ubuntu2+esm1, 4.04.0-2ubuntu4, 4.05.0-10ubuntu1, 4.05.0-10ubuntu1+esm1, 4.05.0-12ubuntu3, 4.08.1-8, 4.11.1-4, 4.11.1-5ubuntu1, 4.13.1-3ubuntu1, 4.13.1-6ubuntu1, 4.14.1-1ubuntu1, 5.3.0-2, 5.3.0-3, 5.4.0-1ubuntu1, 5.4.0-2ubuntu1, 5.4.0-3ubuntu1, 5.4.1-1ubuntu1
Fixed versions
Not specified
CVEs
CVE-2026-28364
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 17:19 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-28364

core-osv · Original source

Published 27 Feb 2026, 04:16 UTC

In OCaml before 4.14.3 and 5.x before 5.4.1, a buffer over-read in 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 using attacker-controlled lengths from crafted Marshal data.

osv:UBUNTU-CVE-2026-28364

ocaml

Fixed versions: Not specified

ocaml

Fixed versions: Not specified

ocaml

Fixed versions: Not specified

ocaml

Fixed versions: Not specified

ocaml

Fixed versions: Not specified

ocaml

Fixed versions: Not specified

ocaml

Fixed versions: Not specified

ocaml

Fixed versions: Not specified

ocaml

Fixed versions: Not specified

Complete source record
{
  "id": "c642844a294c749dc2d5458cf0d001fdf580ebe7b384919739de12e5386896f1",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-28364",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-28364",
    "summary": "In OCaml before 4.14.3 and 5.x before 5.4.1, a buffer over-read in 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 using attacker-controlled lengths from crafted Marshal data.",
    "evidence": "osv:UBUNTU-CVE-2026-28364",
    "products": [
      {
        "name": {
          "value": "ocaml",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.12.1-4ubuntu1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.01.0-3ubuntu2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.01.0-3ubuntu3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.01.0-3ubuntu3.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "4.01.0-3ubuntu3.1+esm1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ocaml",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.01.0-4ubuntu1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "4.02.3-5ubuntu1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "4.02.3-5ubuntu2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "4.02.3-5ubuntu2+esm1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ocaml",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.04.0-2ubuntu4",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.05.0-10ubuntu1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "4.05.0-10ubuntu1+esm1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ocaml",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.05.0-12ubuntu3",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "4.08.1-8",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ocaml",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.11.1-4",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "4.11.1-5ubuntu1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "4.13.1-3ubuntu1",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ocaml",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.13.1-6ubuntu1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "4.14.1-1ubuntu1",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ocaml",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.3.0-2",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "5.3.0-3",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ocaml",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.4.0-3ubuntu1",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "5.4.1-1ubuntu1",
            "evidence": "/affected/7/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ocaml",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.3.0-3",
            "evidence": "/affected/8/versions"
          },
          {
            "value": "5.4.0-1ubuntu1",
            "evidence": "/affected/8/versions"
          },
          {
            "value": "5.4.0-2ubuntu1",
            "evidence": "/affected/8/versions"
          },
          {
            "value": "5.4.0-3ubuntu1",
            "evidence": "/affected/8/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2026-28364",
      "aliases": [
        "UBUNTU-CVE-2026-28364"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ocaml",
            "purl": "pkg:deb/ubuntu/ocaml?arch=source&distro=esm-infra-legacy%2Ftrusty",
            "ecosystem": "Ubuntu:Pro:14.04:LTS"
          },
          "versions": [
            "3.12.1-4ubuntu1",
            "4.01.0-3ubuntu2",
            "4.01.0-3ubuntu3",
            "4.01.0-3ubuntu3.1",
            "4.01.0-3ubuntu3.1+esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28364.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "camlp4",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              },
              {
                "binary_name": "camlp4-extra",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              },
              {
                "binary_name": "ocaml",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              },
              {
                "binary_name": "ocaml-base",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              },
              {
                "binary_name": "ocaml-base-nox",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              },
              {
                "binary_name": "ocaml-compiler-libs",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              },
              {
                "binary_name": "ocaml-interp",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              },
              {
                "binary_name": "ocaml-mode",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              },
              {
                "binary_name": "ocaml-native-compilers",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              },
              {
                "binary_name": "ocaml-nox",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              },
              {
                "binary_name": "ocaml-source",
                "binary_version": "4.01.0-3ubuntu3.1+esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ocaml",
            "purl": "pkg:deb/ubuntu/ocaml?arch=source&distro=esm-apps%2Fxenial",
            "ecosystem": "Ubuntu:Pro:16.04:LTS"
          },
          "versions": [
            "4.01.0-4ubuntu1",
            "4.02.3-5ubuntu1",
            "4.02.3-5ubuntu2",
            "4.02.3-5ubuntu2+esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28364.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ocaml",
                "binary_version": "4.02.3-5ubuntu2+esm1"
              },
              {
                "binary_name": "ocaml-base",
                "binary_version": "4.02.3-5ubuntu2+esm1"
              },
              {
                "binary_name": "ocaml-base-nox",
                "binary_version": "4.02.3-5ubuntu2+esm1"
              },
              {
                "binary_name": "ocaml-compiler-libs",
                "binary_version": "4.02.3-5ubuntu2+esm1"
              },
              {
                "binary_name": "ocaml-interp",
                "binary_version": "4.02.3-5ubuntu2+esm1"
              },
              {
                "binary_name": "ocaml-mode",
                "binary_version": "4.02.3-5ubuntu2+esm1"
              },
              {
                "binary_name": "ocaml-native-compilers",
                "binary_version": "4.02.3-5ubuntu2+esm1"
              },
              {
                "binary_name": "ocaml-nox",
                "binary_version": "4.02.3-5ubuntu2+esm1"
              },
              {
                "binary_name": "ocaml-source",
                "binary_version": "4.02.3-5ubuntu2+esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ocaml",
            "purl": "pkg:deb/ubuntu/ocaml?arch=source&distro=esm-apps%2Fbionic",
            "ecosystem": "Ubuntu:Pro:18.04:LTS"
          },
          "versions": [
            "4.04.0-2ubuntu4",
            "4.05.0-10ubuntu1",
            "4.05.0-10ubuntu1+esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28364.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ocaml",
                "binary_version": "4.05.0-10ubuntu1+esm1"
              },
              {
                "binary_name": "ocaml-base",
                "binary_version": "4.05.0-10ubuntu1+esm1"
              },
              {
                "binary_name": "ocaml-base-nox",
                "binary_version": "4.05.0-10ubuntu1+esm1"
              },
              {
                "binary_name": "ocaml-compiler-libs",
                "binary_version": "4.05.0-10ubuntu1+esm1"
              },
              {
                "binary_name": "ocaml-interp",
                "binary_version": "4.05.0-10ubuntu1+esm1"
              },
              {
                "binary_name": "ocaml-mode",
                "binary_version": "4.05.0-10ubuntu1+esm1"
              },
              {
                "binary_name": "ocaml-nox",
                "binary_version": "4.05.0-10ubuntu1+esm1"
              },
              {
                "binary_name": "ocaml-source",
                "binary_version": "4.05.0-10ubuntu1+esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ocaml",
            "purl": "pkg:deb/ubuntu/ocaml?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "4.05.0-12ubuntu3",
            "4.08.1-8"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28364.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ocaml",
                "binary_version": "4.08.1-8"
              },
              {
                "binary_name": "ocaml-base",
                "binary_version": "4.08.1-8"
              },
              {
                "binary_name": "ocaml-base-nox",
                "binary_version": "4.08.1-8"
              },
              {
                "binary_name": "ocaml-compiler-libs",
                "binary_version": "4.08.1-8"
              },
              {
                "binary_name": "ocaml-interp",
                "binary_version": "4.08.1-8"
              },
              {
                "binary_name": "ocaml-man",
                "binary_version": "4.08.1-8"
              },
              {
                "binary_name": "ocaml-nox",
                "binary_version": "4.08.1-8"
              },
              {
                "binary_name": "ocaml-source",
                "binary_version": "4.08.1-8"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ocaml",
            "purl": "pkg:deb/ubuntu/ocaml?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "4.11.1-4",
            "4.11.1-5ubuntu1",
            "4.13.1-3ubuntu1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28364.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ocaml",
                "binary_version": "4.13.1-3ubuntu1"
              },
              {
                "binary_name": "ocaml-base",
                "binary_version": "4.13.1-3ubuntu1"
              },
              {
                "binary_name": "ocaml-base-nox",
                "binary_version": "4.13.1-3ubuntu1"
              },
              {
                "binary_name": "ocaml-compiler-libs",
                "binary_version": "4.13.1-3ubuntu1"
              },
              {
                "binary_name": "ocaml-interp",
                "binary_version": "4.13.1-3ubuntu1"
              },
              {
                "binary_name": "ocaml-man",
                "binary_version": "4.13.1-3ubuntu1"
              },
              {
                "binary_name": "ocaml-nox",
                "binary_version": "4.13.1-3ubuntu1"
              },
              {
                "binary_name": "ocaml-source",
                "binary_version": "4.13.1-3ubuntu1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ocaml",
            "purl": "pkg:deb/ubuntu/ocaml?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "4.13.1-6ubuntu1",
            "4.14.1-1ubuntu1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28364.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libstdlib-ocaml",
                "binary_version": "4.14.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml",
                "binary_version": "4.14.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-base",
                "binary_version": "4.14.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-base-nox",
                "binary_version": "4.14.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-compiler-libs",
                "binary_version": "4.14.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-interp",
                "binary_version": "4.14.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-man",
                "binary_version": "4.14.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-nox",
                "binary_version": "4.14.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-source",
                "binary_version": "4.14.1-1ubuntu1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ocaml",
            "purl": "pkg:deb/ubuntu/ocaml?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "5.3.0-2",
            "5.3.0-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28364.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libstdlib-ocaml",
                "binary_version": "5.3.0-3"
              },
              {
                "binary_name": "ocaml",
                "binary_version": "5.3.0-3"
              },
              {
                "binary_name": "ocaml-base",
                "binary_version": "5.3.0-3"
              },
              {
                "binary_name": "ocaml-base-nox",
                "binary_version": "5.3.0-3"
              },
              {
                "binary_name": "ocaml-compiler-libs",
                "binary_version": "5.3.0-3"
              },
              {
                "binary_name": "ocaml-interp",
                "binary_version": "5.3.0-3"
              },
              {
                "binary_name": "ocaml-man",
                "binary_version": "5.3.0-3"
              },
              {
                "binary_name": "ocaml-nox",
                "binary_version": "5.3.0-3"
              },
              {
                "binary_name": "ocaml-source",
                "binary_version": "5.3.0-3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ocaml",
            "purl": "pkg:deb/ubuntu/ocaml?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "5.4.0-3ubuntu1",
            "5.4.1-1ubuntu1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28364.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libstdlib-ocaml",
                "binary_version": "5.4.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml",
                "binary_version": "5.4.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-base",
                "binary_version": "5.4.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-interp",
                "binary_version": "5.4.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-man",
                "binary_version": "5.4.1-1ubuntu1"
              },
              {
                "binary_name": "ocaml-source",
                "binary_version": "5.4.1-1ubuntu1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ocaml",
            "purl": "pkg:deb/ubuntu/ocaml?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "5.3.0-3",
            "5.4.0-1ubuntu1",
            "5.4.0-2ubuntu1",
            "5.4.0-3ubuntu1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-28364.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libstdlib-ocaml",
                "binary_version": "5.4.0-3ubuntu1"
              },
              {
                "binary_name": "ocaml",
                "binary_version": "5.4.0-3ubuntu1"
              },
              {
                "binary_name": "ocaml-base",
                "binary_version": "5.4.0-3ubuntu1"
              },
              {
                "binary_name": "ocaml-interp",
                "binary_version": "5.4.0-3ubuntu1"
              },
              {
                "binary_name": "ocaml-man",
                "binary_version": "5.4.0-3ubuntu1"
              },
              {
                "binary_name": "ocaml-source",
                "binary_version": "5.4.0-3ubuntu1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-27T04:17:55.351202032Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-28364"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-28364",
        "https://www.cve.org/CVERecord?id=CVE-2026-28364",
        "https://osv.dev/vulnerability/OSEC-2026-01",
        "https://github.com/ocaml/security-advisories/blob/generated-osv/2026/OSEC-2026-01.json"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-28364",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 460326,
  "published_at": "2026-02-27T04:16:00+00:00"
}