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

API Token Lifecycle: From Issuance to Revocation and Secure Management

The security of API tokens extends far beyond cryptographic signatures. Even a properly signed token using a strong algorithm can be stolen and abused because the signature only prevents modification, not theft. Once an attacker obtains a valid access token, the server typically cannot distinguish the legitimate user from the attacker presenting the stolen credentials.

Stage 1: Token Issuance

Security begins at creation. Public clients such as single-page applications and mobile apps must use the Authorization Code Flow with PKCE rather than legacy implicit flows. PKCE binds the authorization request to a client-generated code_verifier, preventing an attacker who intercepts only the authorization code from completing the exchange. Confidential backend services should use the client_credentials grant with short-lived tokens and regularly rotated secrets stored in dedicated secret-management systems.

Access tokens for browser applications should expire within 5 to 15 minutes. Refresh tokens may live longer, supporting sliding sessions with an absolute maximum lifetime to force re-authentication. Endpoints such as /login, /token, and /oauth/authorize require strict rate limiting that considers account identifiers, device signals, and IP ranges, not just single addresses. Confidential clients can further strengthen authentication by presenting short-lived signed JWT assertions instead of static client secrets.

Stage 2: Client-Side Storage

Storing tokens in localStorage or sessionStorage exposes them to any JavaScript running on the page, including code injected through XSS, compromised npm packages, or supply-chain attacks. HttpOnly cookies marked Secure and SameSite=Lax significantly reduce direct token extraction. The Backend-for-Frontend (BFF) pattern offers even stronger protection by keeping OAuth tokens on the server; the browser receives only an opaque session identifier stored in an HttpOnly cookie. Session data can be maintained in Redis or another secure backend store, enabling centralized rotation, revocation, and monitoring.

Stage 3: Transmission and Usage

Bearer tokens are commonly sent in the Authorization header and require TLS. Cookie-based authentication simplifies client code but necessitates additional CSRF defenses such as synchronizer tokens or strict Origin/Referer validation. Sensitive operations should combine multiple layers rather than relying on any single browser flag.

By following short-lived tokens, atomic refresh-token rotation, HttpOnly cookies or BFF architecture, and comprehensive revocation capabilities, applications can substantially limit the impact of token compromise.

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.