Urgent.News

What's breaking now, across thousands of outlets.

Tech

PKCE Downgrade Attack: When the Authorization Server Accepts Both Flows

Two CVEs against the same identity provider, filed six months apart. CVE-2023-48228 and CVE-2024-23647, both against authentik, describe the same failure: the server accepted PKCE in one request and its absence in the next. RFC 7636 had been published nine years before the first advisory. PKCE binds an authorization code to a secret the client generates before the flow starts. Authorization…

Two security vulnerabilities, CVE-2023-48228 and CVE-2024-23647, were filed against the identity provider authentik, both describing a flaw in the handling of PKCE (Proof Key for Code Exchange). PKCE is a security mechanism defined in RFC 7636 that binds an authorization code to a secret known only to the client. The attackers exploit the fact that some servers accept PKCE in one request but not in the next, allowing them to downgrade the security to a pre-PKCE threat model.

This occurs when the server does not enforce the presence of both code_challenge and code_verifier parameters.

The first vulnerability, CVE-2023-48228, was present in authentik versions 2023.10.4 and 2023.8.5. The authentication endpoint only validated the presence of a code_verifier when it was provided, meaning an attacker could omit it during the token exchange phase. The second vulnerability, CVE-2024-23647, affected authentik versions 2023.10.6 and 2023.8.6. In this case, the authorization endpoint failed to reject requests missing the code_challenge parameter.

The impact of these vulnerabilities is significant, as they enable attackers to intercept and use authorization codes without proper verification. The attacker can conduct a man-in-the-middle (MITM) attack by modifying the authorization request to remove PKCE parameters, leading the server to issue an authorization code without the needed verifier binding. This code can then be exchanged for tokens at the token endpoint, allowing unauthorized access to protected resources.

The root cause of these vulnerabilities lies in the enforcement logic of the servers. According to RFC 9700, servers must support PKCE, enforce the correct code_verifier when a code_challenge is present, and reject token requests containing a code_verifier when no code_challenge was in the authorization request. Despite these requirements, most servers leave enforcement disabled by default, leaving them vulnerable to downgrade attacks.

In all four affected codebases, the issue stems from conditional enforcement based on parameter presence rather than being mandatory. The vulnerabilities have varying CVSS scores, ranging from 6.5 to 7.5, indicating the severity and potential impact of each vulnerability. To mitigate these risks, it is essential to ensure that servers adhere to the PKCE requirements outlined in RFC 9700, enforcing both code_challenge and code_verifier at appropriate stages of the authentication flow.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

HMAC Proves Origin, Not Freshness: Replay Attacks Against Signed APIs

HMAC Proves Origin, Not Freshness: Replay Attacks Against Signed APIs The signature verified. The secret was correct. The payment processed for the fourth time, from a request captured three hours…

  • HMAC verifies request origin, not freshness
  • Signed APIs vulnerable to replay attacks
  • Timestamp inclusion prevents replay vulnerabilities

Stop Hand-Partitioning Disks: Practical systemd-repart on Linux

Stop Hand-Partitioning Disks: Practical systemd-repart on Linux You ship a minimal OS image. The target disk is 64 GB, 256 GB, or 2 TB. Root is still 8 GB. Swap does not exist.

  • systemd-repart simplifies disk partitioning for Linux OS images
  • Configurations defined in repart.d/.conf files, no fragile installer hooks
  • Incremental and idempotent tool, operates on GPT disks

Subdomain Takeover Severity Comes From Security Context, Not the Exploit Mechanism

Subdomain Takeover Severity Comes From Security Context, Not the Exploit Mechanism saostatic.uber.com pointed to an unregistered CloudFront distribution.

  • Severity of subdomain takeover depends on security context, not exploit mechanism.
  • Dangling CNAME can lead to SSO bypass across all services for a domain.
  • 4-question framework aims to address triage failure in classification of critical bugs.

Binary Search Trees

Why should you care? Imagine you have thousands or millions of numbers and frequently need to: Search for a value Insert new values Delete existing values Keep values organized An unsorted array may…

More from Sunday 6 September →