2026-10-20 21:29CVE-2026-85783CPANSec
PUBLISHED5.2CWE-770CWE-405

Crypt::Age versions before 0.004 for Perl allow CPU exhaustion via an unbounded number of recipient stanzas, each costing an X25519 scalar multiplication in unwrap_file_key

Crypt::Age versions before 0.004 for Perl allow CPU exhaustion via an unbounded number of recipient stanzas, each costing an X25519 scalar multiplication in unwrap_file_key.

The header parser accepts any number of recipient stanzas, and unwrap_file_key tries every identity against every X25519 stanza. Each attempt runs a scalar multiplication, an HKDF and a ChaCha20-Poly1305 open. The header MAC cannot be checked first, because its key comes from the file key, which only a successful unwrap produces.

Each stanza is 98 bytes of attacker-chosen header and buys one scalar multiplication per identity held, and the file is rejected only after every one of them has run. A caller reaches this through decrypt, decrypt_file or decrypt_filehandle whenever it decrypts a file it did not write.

Problem type

Affected products

< 0.004 - AFFECTED

References

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-85783
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-85783",
    "assignerOrgId": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
    "assignerShortName": "CPANSec",
    "dateUpdated": "2026-10-20T21:29:03.284Z",
    "dateReserved": "2026-09-04T16:29:19.634Z",
    "datePublished": "2026-10-20T21:29:03.284Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
        "shortName": "CPANSec",
        "dateUpdated": "2026-10-20T21:29:03.284Z"
      },
      "title": "Crypt::Age versions before 0.004 for Perl allow CPU exhaustion via an unbounded number of recipient stanzas, each costing an X25519 scalar multiplication in unwrap_file_key",
      "descriptions": [
        {
          "lang": "en",
          "value": "Crypt::Age versions before 0.004 for Perl allow CPU exhaustion via an unbounded number of recipient stanzas, each costing an X25519 scalar multiplication in unwrap_file_key.\n\nThe header parser accepts any number of recipient stanzas, and unwrap_file_key tries every identity against every X25519 stanza. Each attempt runs a scalar multiplication, an HKDF and a ChaCha20-Poly1305 open. The header MAC cannot be checked first, because its key comes from the file key, which only a successful unwrap produces.\n\nEach stanza is 98 bytes of attacker-chosen header and buys one scalar multiplication per identity held, and the file is rejected only after every one of them has run. A caller reaches this through decrypt, decrypt_file or decrypt_filehandle whenever it decrypts a file it did not write."
        }
      ],
      "affected": [
        {
          "collectionURL": "https://cpan.org/modules",
          "packageName": "Crypt-Age",
          "modules": [
            "Crypt::Age"
          ],
          "programFiles": [
            "lib/Crypt/Age/Header.pm"
          ],
          "programRoutines": [
            {
              "name": "Crypt::Age::Header::parse_from_fh"
            },
            {
              "name": "Crypt::Age::Header::unwrap_file_key"
            }
          ],
          "repo": "https://github.com/Getty/p5-crypt-age",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "0",
              "status": "affected",
              "versionType": "custom",
              "lessThan": "0.004"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-770 Allocation of Resources Without Limits or Throttling",
              "cweId": "CWE-770",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-405 Asymmetric Resource Consumption (Amplification)",
              "cweId": "CWE-405",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://metacpan.org/release/GETTY/Crypt-Age-0.004/changes",
          "tags": [
            "release-notes"
          ]
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "value": "Upgrade to Crypt-Age 0.004 or later."
        }
      ]
    }
  }
}