OSEC-2026-26

See a problem?
Import Source
https://github.com/ocaml/security-advisories/blob/generated-osv/2026/OSEC-2026-26.json
JSON Data
https://api.osv.dev/v1/vulns/OSEC-2026-26
Published
2026-10-23T21:30:00Z
Modified
2026-11-06T19:14:06Z
Severity
  • 4.5 (Medium) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P CVSS Calculator
Summary
runtime_events user event name-based type confusion
Details

ANT-2026-DTBY2HWS

Custom events maintains a cache of user events, it is possible to have a corrupt stream that has a valid message with one message type (which can be custom/unit/span/int) and then has the same event with a different message type.

This would never be encountered in a real program but can lead to a crash.

Fix

Validate event type against expected type, report a corrupt stream on mismatch.

Am I affected?

If the runtime events producer and consumer run in separate processes, and the producer can be tricked into producing malformed data.

Timeline

  • 2026-08-24: vulnerability was found
  • 2026-08-27: forwarded report to security@ocaml.org
  • 2027-10-20: fix merged to trunk
Database specific
{
    "cwe": [
        "CWE-20",
        "CWE-122"
    ],
    "human_link": "https://github.com/ocaml/security-advisories/tree/main/advisories/2026/OSEC-2026-26.md",
    "osv": "https://github.com/ocaml/security-advisories/tree/generated-osv/2026/OSEC-2026-26.json"
}
Credits
    • Anthropic - REPORTER
    • Hannes Mehnert - COORDINATOR
    • Edwin Török - COORDINATOR
    • Edwin Török - REMEDIATION_REVIEWER
    • Sadiq Jaffer - REMEDIATION_DEVELOPER

Affected packages

opam / ocaml

Package

Name
ocaml
Purl
pkg:opam/ocaml

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5
Fixed
5.5.2

Affected versions

5.*
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
5.5.0
5.5.1

Ecosystem specific

{
    "affected_bindings": [
        "Runtime_events.read_poll"
    ],
    "opam_constraint": "ocaml {>= \"5\" & < \"5.5.2\"}"
}

Database specific

source
"https://github.com/ocaml/security-advisories/blob/generated-osv/2026/OSEC-2026-26.json"

Git / github.com/ocaml/ocaml

Affected ranges

Type
GIT
Repo
https://github.com/ocaml/ocaml
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Type
GIT
Repo
https://github.com/ocaml/ocaml
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

5.*
5.5.0
5.5.0-alpha1
5.5.0-alpha2
5.5.0-alpha3
5.5.0-beta1
5.5.0-rc1
5.5.1
Other
flambda_fork_point

Database specific

source
"https://github.com/ocaml/security-advisories/blob/generated-osv/2026/OSEC-2026-26.json"
vanir_signatures
[
    {
        "deprecated": false,
        "digest": {
            "function_hash": "238351531494898125632579313493306629023",
            "length": 718
        },
        "id": "OSEC-2026-26-0fc9649d",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/de10a6b03a471821cb0b868223e5331b919f48c0",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c",
            "function": "ml_user_unit"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "176264376104773389362568381106478940120",
            "length": 1025
        },
        "id": "OSEC-2026-26-233535e3",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/de10a6b03a471821cb0b868223e5331b919f48c0",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c",
            "function": "caml_runtime_events_user_resolve_cached"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "309087821520610588252894647848770994156",
            "length": 743
        },
        "id": "OSEC-2026-26-27aceb51",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/ac2fae847a9c2c35ae3bba90a19adbe5d0cc6f59",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c",
            "function": "ml_user_int"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "334452987031942315782513117655617475676",
            "length": 1708
        },
        "id": "OSEC-2026-26-38452824",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/ac2fae847a9c2c35ae3bba90a19adbe5d0cc6f59",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c",
            "function": "ml_user_custom"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "230108469790414774552558958336150567112",
            "length": 1585
        },
        "id": "OSEC-2026-26-4e9ce3d9",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/de10a6b03a471821cb0b868223e5331b919f48c0",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c",
            "function": "ml_user_custom"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "176264376104773389362568381106478940120",
            "length": 1025
        },
        "id": "OSEC-2026-26-5a7adbd2",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/ac2fae847a9c2c35ae3bba90a19adbe5d0cc6f59",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c",
            "function": "caml_runtime_events_user_resolve_cached"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "136152217218265965909185707408680217118",
            "length": 742
        },
        "id": "OSEC-2026-26-afc7db55",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/de10a6b03a471821cb0b868223e5331b919f48c0",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c",
            "function": "ml_user_span"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "322319622906985454915311928980197848880",
                "150972277783372645370203068319816038117",
                "222976956940567600144501639759981634072",
                "138746191542400183004364305413873203415",
                "22141878631697362976493869264628922701",
                "71889091380332159015273453734391501774",
                "154159288017909375343607643961553898211",
                "116583089050829476534382935120264230164",
                "90579230293688404217853448599793795027",
                "73691084219013548372651490872914135844",
                "330205539599708267436238330174258438488",
                "203911423724247620269615729573539408967",
                "37915156013240456624904615864475935936",
                "25151532000452631526773032402765646719",
                "33137884199938551359399978907093903799",
                "190597266486430962822282330855552429690",
                "187705086344214757739744526788460450650",
                "43241899928053081308771100932446797989",
                "208165889756668131961019307239873096238",
                "222262352982559177083807494130632630205",
                "40048947456904989182113909349430047631",
                "291131537195878972699296509451643529947",
                "227334502380369560192577942564444012645",
                "135491984621591639228612561961948202119",
                "296749493351326628783936141451636269691",
                "82133863986161228431524176172882280939",
                "303722988686254197316547954930679424097",
                "229026812894983074905499428642019689747",
                "289272401699829474339919651592524824212",
                "55636789323429620700483253998077389112",
                "194597086176215311170973040516497736173",
                "271582710362819698125214088100813392302",
                "210231744655894147949494308204424450203",
                "312959792488619407596034068746113365065",
                "333329297002760222623031122252978068513",
                "278791677040752562811219546444116357334",
                "30741153528205490277127267785201589922"
            ],
            "threshold": 0.9
        },
        "id": "OSEC-2026-26-b2bd93df",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/de10a6b03a471821cb0b868223e5331b919f48c0",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "322319622906985454915311928980197848880",
                "150972277783372645370203068319816038117",
                "222976956940567600144501639759981634072",
                "138746191542400183004364305413873203415",
                "22141878631697362976493869264628922701",
                "71889091380332159015273453734391501774",
                "154159288017909375343607643961553898211",
                "116583089050829476534382935120264230164",
                "90579230293688404217853448599793795027",
                "73691084219013548372651490872914135844",
                "330205539599708267436238330174258438488",
                "203911423724247620269615729573539408967",
                "37915156013240456624904615864475935936",
                "25151532000452631526773032402765646719",
                "33137884199938551359399978907093903799",
                "190597266486430962822282330855552429690",
                "187705086344214757739744526788460450650",
                "43241899928053081308771100932446797989",
                "208165889756668131961019307239873096238",
                "222262352982559177083807494130632630205",
                "40048947456904989182113909349430047631",
                "291131537195878972699296509451643529947",
                "227334502380369560192577942564444012645",
                "135491984621591639228612561961948202119",
                "296749493351326628783936141451636269691",
                "82133863986161228431524176172882280939",
                "303722988686254197316547954930679424097",
                "229026812894983074905499428642019689747",
                "289272401699829474339919651592524824212",
                "55636789323429620700483253998077389112",
                "194597086176215311170973040516497736173",
                "271582710362819698125214088100813392302",
                "210231744655894147949494308204424450203",
                "312959792488619407596034068746113365065",
                "333329297002760222623031122252978068513",
                "278791677040752562811219546444116357334",
                "30741153528205490277127267785201589922"
            ],
            "threshold": 0.9
        },
        "id": "OSEC-2026-26-b81bfbaf",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/ac2fae847a9c2c35ae3bba90a19adbe5d0cc6f59",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "136152217218265965909185707408680217118",
            "length": 742
        },
        "id": "OSEC-2026-26-c285bce4",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/ac2fae847a9c2c35ae3bba90a19adbe5d0cc6f59",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c",
            "function": "ml_user_span"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "309087821520610588252894647848770994156",
            "length": 743
        },
        "id": "OSEC-2026-26-df35bd66",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/de10a6b03a471821cb0b868223e5331b919f48c0",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c",
            "function": "ml_user_int"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "238351531494898125632579313493306629023",
            "length": 718
        },
        "id": "OSEC-2026-26-f90f7979",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/ocaml/ocaml/commit/ac2fae847a9c2c35ae3bba90a19adbe5d0cc6f59",
        "target": {
            "file": "otherlibs/runtime_events/runtime_events_consumer.c",
            "function": "ml_user_unit"
        }
    }
]
vanir_signatures_modified
"2026-11-06T19:14:06Z"