Skip to content
Heist/ feed
Back to feed
Medium

erlang-jose RSA JWK parsing attempts to factor an attacker-controlled modulus, enabling CPU-exhaustion denial of service

Type: advisorySources: Official CVE List

Inefficient Algorithmic Complexity in erlang-jose allows an unauthenticated remote attacker to cause a CPU-exhaustion denial of service by submitting a crafted RSA JSON Web Key. When an application parses an untrusted JWK through the public jose_jwk:from_binary/1 or jose_jwk:from_map/1 API (or the Elixir wrappers JOSE.JWK.from_binary/1 and JOSE.JWK.from_map/1), an RSA private key that supplies d, e, and n but omits all Chinese Remainder Theorem parameters (p, q, dp, dq, qi) is routed into convert_sfm_to_crt/1, which tries to recover the missing primes by factoring the modulus. The three integers are read straight from the base64url input and are never validated as a real RSA key. When the modulus cannot be split into two factors (for example, when it is itself prime), the search loop convert_sfm_to_crt_find_p/6 performs a modular exponentiation over the attacker-sized modulus on every iteration and never succeeds. A single request of a few hundred bytes forces close to one CPU-second of work before an internal one-second watchdog kills the worker, and a larger modulus raises the cost further. By flooding such requests an attacker can saturate every scheduler and deny service, without credentials, a valid RSA key, or any special configuration. This issue affects jose: from 1.7.7 before 1.11.13.

Products
jose
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-65631
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 19:51 UTC · Revision 1

Source evidence

erlang-jose RSA JWK parsing attempts to factor an attacker-controlled modulus, enabling CPU-exhaustion denial of service

core-cve · Original source

Published 26 Oct 2026, 19:53 UTC

Inefficient Algorithmic Complexity in erlang-jose allows an unauthenticated remote attacker to cause a CPU-exhaustion denial of service by submitting a crafted RSA JSON Web Key. When an application parses an untrusted JWK through the public jose_jwk:from_binary/1 or jose_jwk:from_map/1 API (or the Elixir wrappers JOSE.JWK.from_binary/1 and JOSE.JWK.from_map/1), an RSA private key that supplies d, e, and n but omits all Chinese Remainder Theorem parameters (p, q, dp, dq, qi) is routed into convert_sfm_to_crt/1, which tries to recover the missing primes by factoring the modulus. The three integers are read straight from the base64url input and are never validated as a real RSA key. When the modulus cannot be split into two factors (for example, when it is itself prime), the search loop convert_sfm_to_crt_find_p/6 performs a modular exponentiation over the attacker-sized modulus on every iteration and never succeeds. A single request of a few hundred bytes forces close to one CPU-second of work before an internal one-second watchdog kills the worker, and a larger modulus raises the cost further. By flooding such requests an attacker can saturate every scheduler and deny service, without credentials, a valid RSA key, or any special configuration. This issue affects jose: from 1.7.7 before 1.11.13.

cve:CVE-2026-65631

jose

Fixed versions: Not specified

jose

Fixed versions: Not specified

Complete source record
{
  "id": "2ac0bf1e378b1c387a84a974abfab1674f0b9ef6087e31dac90b1d38a36097b9",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-65631",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "erlang-jose RSA JWK parsing attempts to factor an attacker-controlled modulus, enabling CPU-exhaustion denial of service",
    "summary": "Inefficient Algorithmic Complexity in erlang-jose allows an unauthenticated remote attacker to cause a CPU-exhaustion denial of service by submitting a crafted RSA JSON Web Key. When an application parses an untrusted JWK through the public jose_jwk:from_binary/1 or jose_jwk:from_map/1 API (or the Elixir wrappers JOSE.JWK.from_binary/1 and JOSE.JWK.from_map/1), an RSA private key that supplies d, e, and n but omits all Chinese Remainder Theorem parameters (p, q, dp, dq, qi) is routed into convert_sfm_to_crt/1, which tries to recover the missing primes by factoring the modulus. The three integers are read straight from the base64url input and are never validated as a real RSA key. When the modulus cannot be split into two factors (for example, when it is itself prime), the search loop convert_sfm_to_crt_find_p/6 performs a modular exponentiation over the attacker-sized modulus on every iteration and never succeeds. A single request of a few hundred bytes forces close to one CPU-second of work before an internal one-second watchdog kills the worker, and a larger modulus raises the cost further. By flooding such requests an attacker can saturate every scheduler and deny service, without credentials, a valid RSA key, or any special configuration. This issue affects jose: from 1.7.7 before 1.11.13.",
    "evidence": "cve:CVE-2026-65631",
    "products": [
      {
        "name": {
          "value": "jose",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      },
      {
        "name": {
          "value": "jose",
          "evidence": "/containers/cna/affected/1/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-65631",
      "aliases": [
        "CVE-2026-65631"
      ],
      "metrics": [
        {
          "format": "CVSS",
          "cvssV4_0": {
            "Safety": "NOT_DEFINED",
            "version": "4.0",
            "Recovery": "NOT_DEFINED",
            "baseScore": 6.9,
            "Automatable": "NOT_DEFINED",
            "attackVector": "LOCAL",
            "baseSeverity": "MEDIUM",
            "valueDensity": "NOT_DEFINED",
            "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
            "providerUrgency": "NOT_DEFINED",
            "userInteraction": "NONE",
            "attackComplexity": "LOW",
            "attackRequirements": "NONE",
            "privilegesRequired": "NONE",
            "subIntegrityImpact": "NONE",
            "vulnIntegrityImpact": "NONE",
            "subAvailabilityImpact": "NONE",
            "vulnAvailabilityImpact": "HIGH",
            "subConfidentialityImpact": "NONE",
            "vulnConfidentialityImpact": "NONE",
            "vulnerabilityResponseEffort": "NOT_DEFINED"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "affected": [
        {
          "cpes": [
            "cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*"
          ],
          "repo": "https://github.com/potatosalad/erlang-jose",
          "vendor": "potatosalad",
          "modules": [
            "jose_jwk_kty_rsa",
            "jose_jwk",
            "'Elixir.JOSE.JWK'"
          ],
          "product": "jose",
          "versions": [
            {
              "status": "affected",
              "version": "1.7.7",
              "lessThan": "1.11.13",
              "versionType": "semver"
            }
          ],
          "packageURL": "pkg:hex/jose",
          "packageName": "jose",
          "programFiles": [
            "src/jwk/jose_jwk_kty_rsa.erl",
            "src/jwk/jose_jwk.erl",
            "lib/jose/jwk.ex"
          ],
          "collectionURL": "https://repo.hex.pm",
          "defaultStatus": "unaffected",
          "programRoutines": [
            {
              "name": "jose_jwk_kty_rsa:from_map/1"
            },
            {
              "name": "jose_jwk_kty_rsa:convert_sfm_to_crt/1"
            },
            {
              "name": "jose_jwk_kty_rsa:convert_sfm_to_crt_find_p/6"
            },
            {
              "name": "jose_jwk:from_binary/1"
            },
            {
              "name": "jose_jwk:from_map/1"
            },
            {
              "name": "'Elixir.JOSE.JWK':from_binary/1"
            },
            {
              "name": "'Elixir.JOSE.JWK':from_map/1"
            }
          ]
        },
        {
          "cpes": [
            "cpe:2.3:a:potatosalad:jose:*:*:*:*:*:*:*:*"
          ],
          "repo": "https://github.com/potatosalad/erlang-jose",
          "vendor": "potatosalad",
          "modules": [
            "jose_jwk_kty_rsa",
            "jose_jwk",
            "'Elixir.JOSE.JWK'"
          ],
          "product": "jose",
          "versions": [
            {
              "status": "affected",
              "version": "d19e1ba68d88c68d29aa942be2573a22dbafca1f",
              "lessThan": "bfd336c0062bff93e65d08c22361897e96afd956",
              "versionType": "git"
            }
          ],
          "packageURL": "pkg:github/potatosalad/erlang-jose",
          "packageName": "potatosalad/erlang-jose",
          "programFiles": [
            "src/jwk/jose_jwk_kty_rsa.erl",
            "src/jwk/jose_jwk.erl",
            "lib/jose/jwk.ex"
          ],
          "collectionURL": "https://github.com",
          "defaultStatus": "unaffected",
          "programRoutines": [
            {
              "name": "jose_jwk_kty_rsa:from_map/1"
            },
            {
              "name": "jose_jwk_kty_rsa:convert_sfm_to_crt/1"
            },
            {
              "name": "jose_jwk_kty_rsa:convert_sfm_to_crt_find_p/6"
            },
            {
              "name": "jose_jwk:from_binary/1"
            },
            {
              "name": "jose_jwk:from_map/1"
            },
            {
              "name": "'Elixir.JOSE.JWK':from_binary/1"
            },
            {
              "name": "'Elixir.JOSE.JWK':from_map/1"
            }
          ]
        }
      ],
      "modified": "2026-10-26T19:53:45.204Z",
      "provider": "cve",
      "references": [
        "https://github.com/potatosalad/erlang-jose/security/advisories/GHSA-3m45-vrpj-xmrq",
        "https://cna.erlef.org/cves/CVE-2026-65631.html",
        "https://osv.dev/vulnerability/EEF-CVE-2026-65631",
        "https://github.com/potatosalad/erlang-jose/commit/d19e1ba68d88c68d29aa942be2573a22dbafca1f",
        "https://github.com/potatosalad/erlang-jose/commit/bfd336c0062bff93e65d08c22361897e96afd956"
      ],
      "provider_metadata": {
        "cna": {
          "orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
          "shortName": "EEF",
          "dateUpdated": "2026-10-26T19:53:45.204Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-65631",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/containers/cna/metrics"
  },
  "source_id": "core-cve",
  "document_id": 338323,
  "published_at": "2026-10-26T19:53:45.204+00:00"
}