{"id":"RUSTSEC-2026-0070","summary":"Panic When Opening or Sealing on Export-Only Context","details":"Constructing an HPKE Context with the AEAD algorithm set to\n`HpkeExport` resulted in a panic when calling `Context::seal`, or\n`Context::open`. This was due to an underflowing integer subtraction\nwhen calculating the length of a vector allocation for the AEAD nonce,\nwhich would panic on its own in debug mode and cause out-of-memory\nabort on the allocation in release mode.\n\n## Impact\nApplications that could be made to use an HPKE context configured with\n`HpkeExport` as AEAD algorithm to open or seal a ciphertext would\ncrash. Other applications are unaffected.\n\n## Mitigation\nStarting with version `0.6.0`, an error will be returned when\nattempting to call `Context::seal` or `Context::open` on an HPKE\ncontext with `HpkeExport` as AEADAlgorithm.","aliases":["GHSA-g433-pq76-6cmf","RUSTSEC-2026-0069","RUSTSEC-2026-0071","RUSTSEC-2026-0072"],"modified":"2026-03-24T08:41:23.142103Z","published":"2026-02-11T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/hpke-rs"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0070.html"},{"type":"WEB","url":"https://github.com/cryspen/hpke-rs/pull/128"}],"affected":[{"package":{"name":"hpke-rs","ecosystem":"crates.io","purl":"pkg:cargo/hpke-rs"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.6.0"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"arch":[],"os":[],"functions":["hpke_rs::Context::open","hpke_rs::Context::seal"]}},"database_specific":{"categories":[],"cvss":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0070.json","informational":null}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"}]}