Cloudanix VulnDB

CVE-2023-50966

Medium · 5.3

CVSS

5.3

EPSS

0.9%

Published

Mar 19, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A software component that handles encrypted web tokens can be tricked into using far too much processing power, making the service slow or unavailable for everyone.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The library performs expensive PBES2 key derivation without enforcing an upper bound on the p2c header parameter, allowing an unauthenticated remote attacker to supply an extremely large integer that forces repeated, CPU-intensive cryptographic iterations.

Why it matters to the business

An attacker can trigger sustained high CPU usage on any service that processes untrusted JOSE tokens, leading to degraded performance, request queuing, or complete service outage until the process is restarted or rate-limited.

How an attack unfolds

An attacker locates an endpoint that accepts JWE or JWS tokens, crafts a header containing a PBES2 algorithm and a p2c value in the millions or higher, and repeatedly sends the token; each request causes the server to spend seconds or minutes performing the key-stretching operation, exhausting CPU resources.

How to fix it

Upgrade erlang-jose to a version that enforces a safe upper bound on p2c (or patches the PBES2 implementation). For the affected AlmaLinux package, update man-pages-overrides to 8.6.0.0-1.el8 or later. If an immediate upgrade is not possible, implement request-size or header-value limits and reject tokens whose p2c exceeds a small threshold such as 10000.

How to confirm the fix worked

After patching, confirm the installed erlang-jose or man-pages-overrides version meets or exceeds the fixed release, then attempt to submit a token with a p2c value above the new limit and verify that the request is rejected quickly without measurable CPU increase.

Typical attack path

  1. Discover service endpoints that accept JSON Web Tokens or encrypted JOSE objects
  2. Inspect or fuzz the accepted algorithms to confirm PBES2 support
  3. Construct a minimal valid-looking header with an algorithm such as PBES2-HS256+A128KW and a p2c value of 10^7 or greater
  4. Transmit the token in an HTTP request, WebSocket message, or API payload
  5. Repeat at a rate sufficient to keep server CPU saturated

How to detect it

Search web-server, application, or API gateway logs for incoming JOSE or JWT payloads whose protected header contains a "p2c" member with an integer value significantly larger than a few thousand; also inspect process CPU telemetry for sudden sustained spikes that coincide with token-processing endpoints.

  • "p2c":\s*[0-9]{5,}
  • PBES2.*p2c

What your security team should do

  • Apply the vendor-supplied update to man-pages-overrides 8.6.0.0-1.el8 (or equivalent erlang-jose patch) within the next maintenance window
  • Add input validation or a WAF rule that drops JOSE headers containing p2c greater than 10000
  • Monitor CPU usage on services that parse untrusted JOSE tokens and alert on sustained spikes correlated with token-processing endpoints

The record

erlang-jose (aka JOSE for Erlang and Elixir) through 1.11.6 allow attackers to cause a denial of service (CPU consumption) via a large p2c (aka PBES2 Count) value in a JOSE header.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 erlang-jose 0 No fix
Debian:12 erlang-jose 0 No fix
Debian:13 erlang-jose 0 No fix
Debian:14 erlang-jose 0 1.11.10-1
Hex jose 0 1.11.7
Ubuntu:18.04:LTS erlang-jose 0 No fix
Ubuntu:20.04:LTS erlang-jose 0 No fix
Ubuntu:22.04:LTS erlang-jose 0 No fix
Ubuntu:24.04:LTS erlang-jose 0 No fix
Ubuntu:24.10 erlang-jose 0 No fix
Ubuntu:25.04 erlang-jose 0 No fix
Ubuntu:25.10 erlang-jose 0 No fix
Ubuntu:Pro:18.04:LTS erlang-jose 0 No fix
Ubuntu:Pro:20.04:LTS erlang-jose 0 No fix

Related vulnerabilities