rustsec-2026-0070
Vulnerability from osv_rustsec
Published
2026-02-11 12:00
Modified
2026-03-24 08:16
Summary
Panic When Opening or Sealing on Export-Only Context
Details

Constructing an HPKE Context with the AEAD algorithm set to HpkeExport resulted in a panic when calling Context::seal, or Context::open. This was due to an underflowing integer subtraction when calculating the length of a vector allocation for the AEAD nonce, which would panic on its own in debug mode and cause out-of-memory abort on the allocation in release mode.

Impact

Applications that could be made to use an HPKE context configured with HpkeExport as AEAD algorithm to open or seal a ciphertext would crash. Other applications are unaffected.

Mitigation

Starting with version 0.6.0, an error will be returned when attempting to call Context::seal or Context::open on an HPKE context with HpkeExport as AEADAlgorithm.


{
  "affected": [
    {
      "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",
        "informational": null
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [
            "hpke_rs::Context::open",
            "hpke_rs::Context::seal"
          ],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "hpke-rs",
        "purl": "pkg:cargo/hpke-rs"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0-0"
            },
            {
              "fixed": "0.6.0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [
    "GHSA-g433-pq76-6cmf"
  ],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "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.",
  "id": "RUSTSEC-2026-0070",
  "modified": "2026-03-24T08:16:07Z",
  "published": "2026-02-11T12:00:00Z",
  "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"
    }
  ],
  "related": [],
  "severity": [
    {
      "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Panic When Opening or Sealing on Export-Only Context"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…