Zum Hauptinhalt springen
LIVE
CVSS 6.9CVE-2026-137684 | A security flaw has been discovered in eosphoros-ai DB-GPT up to 0.8.3. This affects the function editor_sql_run of the file packages/dbgpt-app/src/dbgpt_app/openapi/api_v1/editor/api_editor_v1.py of the component Editor SQL Run API. Performing a manipulation of the argument db_name results in authorization bypass. It is possible to initiate the attack remotely. The exploit has been released to the public and may be used for attacks. The pull request to fixCVSS 8.7CVE-2026-137992 | libexpat through 2.11.0 contains a denial of service vulnerability in defineAttribute() of lib/xmlparse.c that fails to detect duplicate non-ID #IMPLIED or #REQUIRED attribute declarations. Attackers can supply a crafted XML document with repeated ATTLIST declarations in an internal DTD subset to cause quadratic CPU consumption in storeAtts() during parsing.CVSS 8.5CVE-2026-137994 | Leo through 6.8.10 contains an insecure deserialization vulnerability that allows attackers to execute code by embedding pickled data in unknown XML attributes of .leo outlines. Attackers can place a pickle __reduce__ gadget in a or element attribute that resolveUa passes to pickle.loads, executing code with user privileges when the outline is opened.CVSS 7.0CVE-2026-137995 | FOG Project before 1.6.0.119 contains an information disclosure vulnerability that allows unauthenticated attackers to obtain host tokens from status/hostgetkey.php by supplying a host MAC address. Attackers can present the token to service/hostinfo.php to retrieve decrypted Active Directory join credentials and Windows product keys during deployment windows.CVSS 6.8CVE-2026-137996 | Zettlr before 4.11.0 fails to validate URI schemes in Markdown link targets, allowing attackers to launch arbitrary registered protocol handlers via Electron shell.openExternal without confirmation. Attackers can craft documents whose Ctrl/Cmd-clicked links use smb:// to leak NTLM credential hashes on Windows or invoke custom protocol handlers with attacker-controlled parameters.CVSS 8.5CVE-2026-137997 | HCIPy through 0.7.1 contains an insecure deserialization vulnerability that allows attackers to execute code by supplying crafted .pkl files to read_field, read_grid or read_mode_basis. Because hcipy/util/io.py selects pickle by file extension and calls pickle.load, a __reduce__ gadget in a pupil, apodizer, PSF or mode-basis file runs code with the user's privileges.CVSS 8.5CVE-2026-137998 | Detoxify 0.5.3 through 0.5.4 contains an insecure deserialization vulnerability in load_checkpoint that allows attackers to execute code by supplying a crafted checkpoint file. Attackers can embed a pickle __reduce__ gadget in a .ckpt file loaded via torch.load with weights_only=False to run code with the user's privileges.CVSS 8.5CVE-2026-137999 | JSONSchema2PoPo2 through 3.0.3 contains a code injection vulnerability that allows attackers to inject Python code by supplying JSON Schema default or format values that are written unescaped. Attackers can place a single quote in a string property default to break out of the literal in the generated __init__ signature, executing injected code when the generated module is imported.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

From Passwords to Token-based Authentication

Every authentication mechanism in use today emerged to address a specific set of constraints the previous one wasn't designed for. This article walks through…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 9 Min. Lesezeit
Quelle: dev.to
Rubrik: Secure Programming

Every authentication mechanism in use today emerged to address a specific set of constraints the previous one wasn't designed for. This article walks through that chain — not as a list of definitions, but as a sequence of problems and the constraints that shaped each solution.






1. The Problem With Sending Passwords Every Request



The earliest widely used approach, HTTP Basic Authentication, is also the simplest to understand. The client sends the username and password, base64-encoded, on every single request:



GET /api/data

Authorization: Basic dXNlcjpwYXNzd29yZA==



Base64 is not encryption — it's just a reversible encoding. Anyone who intercepts this header has the raw credentials.



This approach has three structural problems.




  • First, the password is transmitted on every request, which means every request is a new opportunity for it to leak — through logs, proxies, or a compromised network.

  • Second, the server has to validate credentials against the database on every single call, since there's no concept of an established session; that's a database hit for every API request, which doesn't scale.

  • Third, there's no way to limit what the credentials can do or for how long. The password grants full access until it's changed, and changing it is the only way to revoke access — there's no way to invalidate just one client's access without affecting every other client using the same password.






2. Sessions Try to Fix It, But Introduce New Problems



The next evolution moved the credential check to a single moment: login. After verifying the password once, the server creates a session, stores it (in memory or a database), and gives the client a session ID, usually via a cookie. Every subsequent request just sends that ID, not the password.





  1. The user logs in by submitting their username and password.


       Browser ───────────────▶ Server
    Login Request



  2. The server validates the credentials.


       Server ── checks username/password ──▶ Database



  3. If the credentials are valid, the server creates a new session, stores it in the session store, and generates a unique session ID.


       Server ───────────────▶ Session Store
    Create Session



  4. The server returns the session ID to the browser in a Set-Cookie header.


       Server ───────────────▶ Browser
    Set-Cookie: session_id=abc123



  5. For every subsequent request, the browser automatically includes the session cookie.


       Browser ───────────────▶ Server
    Request + session_id cookie



  6. The server uses the session ID to retrieve the corresponding session from the session store.


       Server ───────────────▶ Session Store
    Lookup session_id
    Session Store ─────────▶ Server
    Session data



  7. If the session exists and is still valid, the server processes the request and returns the requested resource.


       Server ───────────────▶ Browser
    Response




This solves the repeated-password-exposure problem cleanly. But it trades that problem for a different set of issues. The server now has to store and look up a session on every request, which is a form of state that has to live somewhere and be kept in sync if you're running more than one server. Cookies are also sent automatically by the browser, which is exactly what makes them vulnerable to CSRF — a malicious site can trigger a request that carries the user's cookie without their knowledge. And sessions are fundamentally a browser-native concept; they don't map cleanly onto mobile apps, CLI tools, or server-to-server calls, all of which have no natural concept of a cookie jar. For those contexts specifically, sessions weren't a broken solution — they were a solution built for a different problem.






3. Bearer Tokens Go Stateless



The fix here was to stop relying on server-side storage altogether and instead issue a self-contained token — most commonly a JWT (JSON Web Token) — that carries its own proof of validity.





The token is called a "bearer" token because possession is the only requirement — whoever holds it can use it, no further proof needed. Crucially, the server doesn't need to look anything up in a database to validate it; it just verifies the signature.



Session-based check: Request → DB/store lookup → Response (stateful)

Bearer token check: Request → verify signature → Response (stateless)



This single change resolves several of the earlier problems at once. There's no session store to maintain or synchronize across servers. The token can carry scopes, limiting exactly what it's allowed to do, rather than granting blanket access. And because it's just a string in a header, it works identically whether the caller is a browser, a mobile app, a CLI tool, or another backend service — there's no cookie-jar assumption baked in.






4. The New Tension Bearer Tokens Introduce



Solving the statelessness problem exposes a different question that sessions never really had to answer cleanly: how long should a token live?

A short-lived token limits the damage if it's ever stolen — an attacker only has a small window before it expires. But it also means the user gets logged out frequently, since there's no way to silently extend access once the token has expired. A long-lived token solves the convenience problem, but now a single stolen token grants extended, possibly indefinite access, which is a much worse outcome if it leaks.



Short-lived token: safer if stolen, but logs the user out constantly

Long-lived token: convenient, but dangerous if it's ever compromised



Picking one or the other means accepting one of these two problems outright. The fix wasn't to pick a side — it was to stop treating this as a single-token problem.






5. Refresh Token Flow Resolves the Tension



Instead of one token trying to be both safe and convenient, the solution introduces two tokens, each optimized for a different job. The access token is short-lived and is the one actually sent with every API call. The refresh token is long-lived, but it's used for exactly one purpose: silently obtaining a new access token when the old one expires. It's never sent to the API directly.



`1. The user logs in by submitting their credentials.




       Client ───────────────▶ Auth Server
Login Request`






  1. The authentication server verifies the credentials.


      Auth Server ── validates username/password ──▶ User Database



  2. If authentication succeeds, the server issues two tokens:


    A short-lived access token (e.g., 15 minutes)
    A long-lived refresh token (e.g., 30 days)

    Auth Server ───────────────▶ Client
    access_token
    refresh_token



  3. The client calls protected APIs using the access token.


       Client ───────────────▶ API
    Authorization: Bearer access_token



  4. The API validates the access token. If it's valid, the request

    is processed and the response is returned.


       API ── verifies token signature/claims ──▶
    API ───────────────▶ Client
    Response



  5. After the access token expires, API requests are rejected

    with an authentication error (typically 401 Unauthorized).


       Client ───────────────▶ API
    Expired access_token
    ◀─────────────── 401 Unauthorized



  6. The client sends the refresh token to the authentication server

    to obtain a new access token.


       Client ───────────────▶ Auth Server
    refresh_token



  7. The authentication server validates the refresh token and,

    if it's still valid, issues a new access token

    (and optionally a new refresh token).


       Auth Server ───────────────▶ Client
    new access_token



  8. The client retries the original request using the new

    access token and continues working without requiring

    the user to log in again.


       Client ───────────────▶ API
    Authorization: Bearer new_access_token
    ◀─────────────── Response`




This refresh exchange happens silently in the background, invisible to the user — there's no re-login screen, no interruption. The user only has to log in again once the refresh token itself eventually expires, which can be set to a much longer window precisely because the refresh token isn't exposed to the same attack surface as the access token; it's used rarely, against a single dedicated endpoint, rather than being sent on every API call where it would have more chances to leak.



This two-token model is part of the OAuth 2.0 specification, which formalized exactly this pattern: access tokens for calling resources, refresh tokens for renewing access, and a clear separation of purpose between the two.






6. How Access and Refresh Tokens Improve on Earlier Approaches



Looking back at the chain, the access token plus refresh token pair addresses each prior constraint in turn. The password itself is only ever sent once, at login — not on every request, which closes the exposure problem Basic Auth had. There's no server-side session store to maintain, since the access token is self-contained and stateless, removing the scaling constraint that sessions introduce for multi-server deployments. The user isn't forced to log in every few minutes, since the refresh token silently renews access in the background. And if an access token does leak, the damage is bounded by its short expiry, while the refresh token — the more sensitive, longer-lived credential — is never exposed on routine API calls in the first place, limiting its attack surface.



Each step in this chain didn't make the previous mechanism wrong — it made it insufficient for a different set of requirements: scale, statelessness, portability across client types, and convenience without sacrificing security. The access token and refresh token pair is where that chain currently settles in stateless, API-driven systems, and it's the foundation that more specialized mechanisms later build directly on top of it.






7. When Sessions Are Still the Right Choice



Bearer tokens and refresh tokens address the constraints of stateless, multi-client APIs well — but that doesn't make sessions obsolete. They remain widely used, and in several contexts they're genuinely the better fit.




  • Immediate revocation is a hard requirement. When a user logs out of a session-based system, the server deletes the session record, and access stops immediately. With bearer tokens, logout on the client side doesn't invalidate the token itself — it just discards it locally. The token remains technically valid until it expires, which is acceptable for most applications but not for systems where instant revocation is non-negotiable, such as banking platforms or enterprise applications managing sensitive data.

  • The client is exclusively a browser. Sessions and cookies were designed for exactly this context. If your application is a traditional server-rendered web app with no mobile client, no public API, and no third-party consumers, sessions carry less overhead and are simpler to implement correctly.

  • The use case is internal or enterprise-facing. Internal tools, admin panels, and enterprise web applications often prioritize control and auditability over scalability. Session-based auth fits this context well — each active session is visible and individually revocable from the server side, which matters when you need to respond quickly to a compromised account.



In practice, many large systems use both approaches for different layers: session-based auth for first-party browser interfaces where the server needs tight control, and token-based auth for APIs and third-party integrations where statelessness and portability matter more. The two aren't mutually exclusive — they answer different questions.

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community discussion & comments

🌐 Join the main chat

Start the discussion in the Social Chat broadcast stream or submit an expert contribution via the supplement form above.

Cyber Threat Intelligence & Forensics

ATT&CK Navigator · IoC Radar & Graph

CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
3 Knoten · 2 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
Community Rating & Social Proof
⭐ Reader Rating
–
Ø / 5.0
No reader ratings yet
Was this article helpful?
0
Submit your rating
Detailed rating (optional)
Content & Quality
Source & Credibility
Freshness
Security Briefing Free · 1-Click Unsubscribe

Intelligence Digest — free

The top security news daily · unsubscribe anytime

Related story clusters & sources (vector AI)

2 Cluster
2 sources
OpenAI counter-sues Apple over trade secret theft
AppleInsider News 49 min. ago
1 more source
Similar posts
🔍 Verwandte News

Auch interessante Nachrichten From Passwords to Token-based Authentication

Thematisch verwandte Begriffe: From, Passwords, Tokenbased, Authentication · 6 Treffer

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

💬 Loading comments…
Pull to refresh
Widgets & Topics
Loading widgets…
Nächster Beitrag