Securitylab•September 11, 2026•🇷🇺Translated from Russian

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

Habr•Vulnerabilities & Exploits

Dart and Flutter SDKs Patch Critical TLS Flaw Tied to Compromised eMudhra Certificates

Dart and Flutter teams released updates to block compromised intermediate certificates from the eMudhra certificate authority. The flaw affects applications built for Android, Windows, and Linux that rely on dart:io for HTTPS connections. Stable releases include Dart 3.13.7 and Flutter 3.47.8, while beta channels received Dart 3.14.0-315.3.beta and Flutter 3.50.0-0.2.pre. The root cause traces to insufficient randomness during key generation for eight eMudhra intermediate CAs disclosed in October 2026. Because dart:io uses its own BoringSSL implementation rather than system revocation lists, applications must be rebuilt and redistributed to users. Additional changes improve root certificate handling on Android 14 and later via Conscrypt APEX modules.

Habr•Vulnerabilities & Exploits

Vulnerability Management Evolution: From Manual Scans to Continuous Threat Exposure Management

This final installment of the Vulnerability Management for Beginners series examines how the discipline has transformed over recent years into an essential component of organizational risk management. The article highlights the dramatic increase in disclosed vulnerabilities, now approaching 48,000 per year, and stresses that fewer than one percent pose real-world risk. It details the shift toward automated asset inventory integrated with SIEM, EDR, and CMDB systems, alongside multi-factor prioritization combining CVSS, EPSS, KEV lists, and FSTEC methodologies. New practices such as EASM, automated penetration testing, BAS, and CTEM are presented as extensions of a mature foundational process rather than replacements. The piece also covers regulatory tightening in Russia through FSTEC Order No. 117, mandatory remediation timelines, and the impact of AI on both defense and attack surfaces. It concludes with a practical Monday-morning action list focused on asset counting, threat feed integration, SLA definition, and cross-team coordination between IT and security.

Security NEXT•Vulnerabilities & Exploits

Fortinet Discloses Eight FortiOS Vulnerabilities Including Three Critical Flaws

Fortinet has published security advisories detailing eight vulnerabilities affecting its FortiOS operating system used in UTM appliances. Three of the issues received the highest severity rating of Critical. CVE-2026-126259 allows unauthenticated command execution with super-admin privileges in FGSP combined with configuration synchronization or auto-scale setups via crafted HA packets. CVE-2026-126254 stems from integer truncation in the BGP daemon and can propagate malicious attributes from configured iBGP peers. CVE-2026-126253 enables authentication bypass in the OSPF daemon, permitting unauthenticated LSA injection. The remaining five vulnerabilities were assigned lower severity ratings. Administrators are urged to apply the available patches promptly.

Security NEXT•Vulnerabilities & Exploits

Microsoft Patches Over 1,000 Vulnerabilities in November 2026 Patch Tuesday Release

Microsoft has issued its November 2026 monthly security updates, addressing a total of 1,093 vulnerabilities across Windows, Office, Azure, SQL Server, SharePoint Server, Exchange Server, and Developer Tools. The update also covers a vulnerability in the third-party Tencent RapidJSON library identified as CVE-2026-124586. Among the fixes, 63 vulnerabilities received the highest severity rating of Critical, while 1,029 were rated Important. Privilege escalation issues accounted for the largest share with 535 cases, followed by 296 remote code execution flaws. Several vulnerabilities have already been confirmed as exploited in the wild. The release follows the standard Patch Tuesday schedule on the second Tuesday of the month.