Email me

Rust advisories / hpke-rs

Vulnerability HighRUSTSEC-2026-0069 · hpke-rs

RUSTSEC-2026-0069: Incorrect Length Encoding on KDF Export

Short answerA security vulnerability in the hpke-rs crate: Incorrect Length Encoding on KDF Export. GitHub rates it High. Fixed in 0.6.0: update to a fixed version.

Cratehpke-rs
TypeVulnerability
Affected versionsBefore 0.6.0.
Fixed in0.6.0
SeverityHigh (GitHub rating)
Published2026-02-11
Last changed2026-03-24
Also known asGHSA-g433-pq76-6cmf, RUSTSEC-2026-0070, RUSTSEC-2026-0071, RUSTSEC-2026-0072
Affected functionshpke_rs::Context::export

What to do

  1. See which version you have: cargo tree -i hpke-rs (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p hpke-rs. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example hpke-rs = "0.6.0") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

Passing values length > 65535 to Context::export produces output that disagrees with the RFC 9180 label encoding. In particular the length value is cast to u16 truncating any value exceeding 65535.

Impact

Applications that use hpke-rs to export very large secrets would experience interoperability issues with other applications that use a correct implementation to export very large secrets.

Mitigation

Starting with version 0.6.0, an error will be returned when attempting to call Context::export with an output length > 65535.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Other advisories for hpke-rs

Full security history of hpke-rs

Up next

Same cratehpke-rs: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ