PKCE Becomes Mandatory for OAuth Public Clients as RFC 9700 and OAuth 2.1 Close Authorization Code Interception Risks
The OAuth authorization code grant was designed to avoid exposing user passwords to applications by issuing short-lived codes instead of tokens directly. However, public clients such as native mobile apps and single-page applications cannot securely store a client_secret, leaving intercepted codes vulnerable to exchange for tokens.
PKCE (Proof Key for Code Exchange), defined in RFC 7636, solves this by requiring the client to generate a high-entropy code_verifier (43–128 characters) and send its SHA-256 hash as code_challenge during the initial authorization request. The authorization server stores the challenge and later verifies it against the verifier supplied at the token endpoint.
Why mobile apps cannot rely on client secrets
Server-side applications keep secrets in environment variables, but native Android or iOS apps can be decompiled and browser-based applications expose all source code. Even protected storage like iOS Keychain or Android Keystore can be bypassed on jailbroken or rooted devices, making any embedded secret effectively public.
The attack PKCE was created to stop
Multiple applications can register the same custom URI scheme such as myapp://callback. When the authorization server redirects the code, the operating system may deliver it to a malicious app that quietly declared the same scheme in its manifest. RFC 7636 notes that such code interception attacks have been observed in the wild.
How PKCE works in practice
The client creates a code_verifier using a cryptographically secure random generator, computes the code_challenge as BASE64URL(SHA256(verifier)), and includes it with code_challenge_method=S256. At token exchange the original verifier is sent over a secure channel; the server recomputes the hash and rejects any mismatch with an invalid_grant error.
The plain method offers only limited protection and is deprecated in favor of S256, which is mandatory to implement on servers. Omitting the method parameter defaults to plain, silently weakening security.
Three distinct threats often confused
- Code interception: malicious app steals the real user code via URI scheme collision.
- Code injection: attacker supplies its own code to bind a victim session to the attacker account; PKCE blocks this even for confidential clients.
- Downgrade: server accepts requests without a challenge, disabling verification entirely.
PKCE does not replace other safeguards
The state parameter still protects against CSRF, and nonce in OpenID Connect ensures ID token freshness. RFC 9700 allows relying on PKCE for CSRF protection only after confirming server support. PKCE also does not protect issued access tokens; sender-constrained mechanisms such as DPoP (RFC 9449) or mutual TLS (RFC 8705) address that layer.
Current status in 2025–2026
RFC 9700 (BCP) already requires PKCE for public clients and recommends it for confidential clients. The OAuth 2.1 draft (draft-ietf-oauth-v2-1-15) integrates PKCE into the core flow and removes implicit and ROPC grants. Providers differ in defaults: Auth0 and Okta enforce S256, while Microsoft Entra ID still documents both methods.
Even AI agent authorization frameworks such as the Model Context Protocol are adopting OAuth 2.1 with PKCE for HTTP transports where static secrets are impractical.
Related articles
Apple Releases iOS 27.2 and iPadOS 27.2, Patching 163 Vulnerabilities Including Exploited Flaws in Older Versions
Apple has issued security updates for iOS and iPadOS, addressing a wide range of vulnerabilities across current and legacy operating systems. The iOS 27.2 and iPadOS 27.2 releases fix 163 CVEs affecting WebKit, the kernel, and image processing components. Older branches received targeted patches, with iOS 26.7.2 resolving 134 issues and iOS 18.7.11 addressing three vulnerabilities that include an actively exploited flaw. Specific fixes cover remote code execution risks in WebKit and ImageIO, plus sandbox bypasses. The updates were published on October 26, 2026, and apply to both iPhone and iPad devices. Apple also published detailed security content advisories for each branch.
CISA Adds PHP2Shell Flaws CVE-2026-109618 and CVE-2026-109619 to KEV Catalog After Confirmed Exploitation
The U.S. Cybersecurity and Infrastructure Security Agency has confirmed active exploitation of two remotely exploitable vulnerabilities in PHP collectively known as PHP2Shell. CVE-2026-109618 stems from improper handling during memory exhaustion, while CVE-2026-109619 involves use-after-free issues in internal state management. Both flaws allow unauthenticated remote code execution and pose elevated risk to any PHP environment processing external requests such as web servers. PHP development teams released patches on October 21 for supported branches including PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, along with source-level fixes for end-of-life versions 7.4, 8.0 and 8.1. CISA has set a three-day remediation deadline of October 29 for U.S. federal agencies and requires verification that systems have not been compromised.
Security Week 2644: Active Exploitation of PHP2Shell Vulnerabilities Confirmed
PHP developers released patches for two critical vulnerabilities collectively known as PHP2Shell on October 20, affecting PHP 8.2 through 8.5 as well as older branches. The flaws allow unauthenticated remote code execution on affected servers, which power approximately 70 percent of websites. Despite expectations of immediate exploitation, confirmed attacks with working exploits only began on October 25. CrowdStrike noted technical difficulties in weaponizing the issues in real-world environments. Only one-fifth of top Russian websites had applied the fixes by October 25. Additional incidents included compromised eMudhra certificates, a critical GitLab flaw, and a 16-year-old Broadcom router vulnerability.
Positive Technologies Offers Up to 500,000 Rubles for Bypassing PT Application Firewall
Positive Technologies has expanded its Standoff Bug Bounty program to include rewards for bypassing its web application firewalls. Researchers can earn between 150,000 and 500,000 rubles for demonstrating practical bypasses against PT Application Firewall PRO and PT Application Firewall Cloud. The program targets the core protective mechanisms, including traffic filtering, attack detection rules, and the management layer used by administrators. Submissions must include reproducible attack scenarios that show how malicious requests can pass through undetected, rather than relying on scanner reports or theoretical findings. Reward amounts vary by severity and confirmed business impact, with critical issues in the PRO version paying up to 500,000 rubles. The company plans to use validated findings to strengthen detection rules and improve overall product resilience.