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

- Database: RustSec
- Published: 2026-02-11
- Modified: 2026-03-24

## Also published as

- [GHSA-G433-PQ76-6CMF](https://cve.now/GHSA-G433-PQ76-6CMF.md) (GitHub)
- [RUSTSEC-2026-0070](https://cve.now/RUSTSEC-2026-0070.md) (RustSec)
- [RUSTSEC-2026-0071](https://cve.now/RUSTSEC-2026-0071.md) (RustSec)
- [RUSTSEC-2026-0072](https://cve.now/RUSTSEC-2026-0072.md) (RustSec)

## Affected versions

- hpke-rs (crates.io): fixed in 0.6.0

## Description

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

- https://crates.io/crates/hpke-rs
- https://rustsec.org/advisories/RUSTSEC-2026-0069.html
- https://github.com/cryspen/hpke-rs/pull/128

Page: https://cve.now/RUSTSEC-2026-0069

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
