rustsec-2026-0124
Vulnerability from osv_rustsec
Published
2026-03-29 12:00
Modified
2026-05-13 10:05
Summary
Potential Panic on Overlong Ciphertext Buffer
Details

An application that passes in a ciphertext buffer of length greater than ptxt.len() + TAG_LEN to libcrux_chacha20poly1305::encrypt or libcrux_chacha20poly1305::xchacha20_poly1305::encrypt would experience a panic.

Impact

An application where the length of the ciphertext buffer is under attacker control could be made to crash.

Mitigation

The fix makes it so that libcrux_chacha20poly1305::encrypt and libcrux_chacha20poly1305::xchacha20_poly1305::encrypt no longer panic in this case, but instead write out the ciphertext and tag into the first ptxt.len() + TAG_LEN bytes of the provided buffer.


{
  "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": [
            "libcrux_chacha20poly1305::encrypt",
            "libcrux_chacha20poly1305::xchacha20_poly1305::encrypt"
          ],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "libcrux-chacha20poly1305",
        "purl": "pkg:cargo/libcrux-chacha20poly1305"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0-0"
            },
            {
              "fixed": "0.0.8"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "An application that passes in a ciphertext buffer of length greater\nthan `ptxt.len() + TAG_LEN` to `libcrux_chacha20poly1305::encrypt` or\n`libcrux_chacha20poly1305::xchacha20_poly1305::encrypt` would\nexperience a panic.\n\n## Impact\nAn application where the length of the ciphertext buffer is under\nattacker control could be made to crash.\n\n## Mitigation\nThe fix makes it so that `libcrux_chacha20poly1305::encrypt` and\n`libcrux_chacha20poly1305::xchacha20_poly1305::encrypt` no longer\npanic in this case, but instead write out the ciphertext and tag into\nthe first `ptxt.len() + TAG_LEN` bytes of the provided buffer.",
  "id": "RUSTSEC-2026-0124",
  "modified": "2026-05-13T10:05:44Z",
  "published": "2026-03-29T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/libcrux-chacha20poly1305"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2026-0124.html"
    },
    {
      "type": "WEB",
      "url": "https://github.com/cryspen/libcrux/pull/1386"
    }
  ],
  "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": "Potential Panic on Overlong Ciphertext Buffer"
}


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…