Skip to main content

CVE-2024-53857 — Vulnerability in pgp — CVE Details

HIGH

rPGP Potential Resource Exhaustion when handling Untrusted Messages

Published December 5, 2024Updated December 5, 2024Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.85%). Schedule for your next planned update.

Does your project use an affected pgp version?

Paste your Cargo.lock to check it for CVE-2024-53857 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Cargo.lock

Summary

During a security audit, Radically Open Security discovered two vulnerabilities which allow attackers to trigger resource exhaustion vulnerabilities in rpgp by providing crafted messages. This affects general message parsing and decryption with symmetric keys.

Impact

Affected rpgp versions do not correctly set upper limits on the total reserved amount of memory when parsing long sequences of partial OpenPGP packets, which can grow to to several GiB in size. Additionally, up to 4GiB of memory is reserved for OpenPGP packets of fixed size with large length fields, even if less data is received. Depending on existing message size restrictions and available system resources, this can cause out-of-memory conditions and crash the rpgp process or cause other system instability through memory resource exhaustion when parsing crafted messages.

Affected rpgp versions are susceptible to excessive memory allocation with values of up to 2TiB or long processing times for some decryption operations which involve the Argon2 function. An attacker can provide a valid Symmetric Key Encrypted Session Key packet (SKESK) which uses Argon2 for String-to-Key hashing with parameters that are excessive, but within specification limits of the RFC9580 OpenPGP standard. Since rpgp did not further restrict the Argon2 parameters, this can cause out-of-memory conditions and crash the rpgp process. Under some conditions, the memory resource exhaustion may trigger other system instability. Alternatively, this can make the program unresponsive via long computations. The attacker needs to trick a victim into attempting decryption, but does not require knowledge of the symmetric secret used by the victim.

There is no impact to confidentiality or integrity security properties.

Versions and Patches

The impact details on the message parsing component varies with different versions. We've confirmed some of the problematic behavior on older versions such as v0.10.0 and see all recent versions as affected in some form.

The affected Argon2 functionality was introduced with v0.12.0-alpha.1, earlier versions are not vulnerable.

The vulnerabilities have been fixed with version 0.14.2. We recommend all users to upgrade to this version.

References

The security audit was made possible by the NLnet Foundation NGI Zero Core grant program for rpgp.

Advisory Timeline

  • First published December 5, 2024 (721 days ago).
  • Last revised December 5, 2024 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update pgp to 0.14.2 or later
cargo update -p pgp --precise 0.14.2

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: crates.io (1).

PackageFixed In
pgp crates.io · Affected: All versions0.14.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-770
    Allocation of Resources Without LimitsMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Frequently Asked Questions

What is CVE-2024-53857?
rPGP Potential Resource Exhaustion when handling Untrusted Messages. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
How do I check if my project is affected by CVE-2024-53857?
CVE-2024-53857 affects pgp. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-53857 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.5

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.85%
EPSS percentile: 55.5

This is an above-median EPSS score — 55.5% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-4grw-m28r-q285

Related CVEs

  • CVE-2024-53856
    HIGH

    Panics on Malformed Untrusted Input

  • CVE-2026-83816
    HIGH

    CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE

  • CVE-2026-83817
    HIGH

    CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution

  • CVE-2024-53856
    HIGH

    rPGP Panics on Malformed Untrusted Input

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock