Integer Overflow or Wraparound Affecting hpke-rs package, versions <0.6.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Integer Overflow or Wraparound vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-HPKERS-15285653
  • published16 Feb 2026
  • disclosed13 Feb 2026
  • creditNadim Kobeissi

Introduced: 13 Feb 2026

New CVE NOT AVAILABLE CWE-190  (opens in a new tab)

How to fix?

Upgrade hpke-rs to version 0.6.0 or higher.

Overview

hpke-rs is an implementation of HPKE (RFC 9180) with flexible crypto backends.

Affected versions of this package are vulnerable to Integer Overflow or Wraparound due to the unchecked sequence number increment in the Context encryption/decryption routines in src/lib.rs. An attacker can cause nonce reuse and compromise AEAD confidentiality and integrity by triggering a wraparound of the 32-bit context counter past its maximum value.

CVSS Base Scores

version 4.0
version 3.1