ToolSura
    HomeToolsBlog
    Home/Authors/Hiro Tanabe
    Hiro Tanabe

    Hiro Tanabe

    I take one token and walk through it in order, because the failure modes only separate once all three parts sit next to each other. A JWT is three base64url segments: a header, a payload and a signature. The signature covers the first two, joined by a dot. That structure explains almost every attack, because it means a reader must decide whether to trust the header's contents before it can check anything. That decision is the alg field, and the serious problems live there. A token declaring alg none carries no signature to verify. Worse, a server accepting whatever algorithm the header names can be handed a token where alg says HMAC and the public RSA key is used as the shared secret, producing a signature the attacker can produce themselves. The defence is to ignore the header and configure the expected algorithm, which is what RFC 8725 asks for and what a surprising number of libraries do not do by default. Claims need the same scrutiny. exp and nbf are checked against the clock on the verifying side, so a few minutes of drift is normal and a lot of it is a bug. iss and aud decide which system a token was meant for, and a token skipping either check can be replayed against the wrong service. jti exists for revocation and does nothing unless somebody keeps a list. I cover where the token lives too. localStorage survives a reload and is readable by any script that runs, which turns one injection bug into session theft. Cookies with HttpOnly and the right SameSite setting narrow that, and the trade-off deserves stating plainly.

    About ToolSura

    ToolSura offers 80+ free, privacy-first online tools that run 100% in your browser — no uploads, no logins. Learn more about our mission →

    ToolSuraPrivacy-First Tools

    Free utilities that run in your browser. No trackers, no accounts, no uploads.

    All Systems Operational

    Product

    • Free Online Tools
    • Contact
    • FAQs
    • About

    Legal

    • Privacy Policy
    • Cookie Policy
    • Terms & Conditions

    Resources

    • Blog
    • Brand
    • Help

    Social Links

    • Bluesky
    • Mastodon
    • X
    • Product Hunt
    • GitHub
    • LinkedIn
    • DEV.to
    • YouTube

    © 2026 ToolSura. Free tools that run in your browser.

    Remote-First / Based in India

    Technical Manifesto

    Private • Client-Side • No Uploads

    ToolSura on Nick Launches
    Browser-Native
    Privacy-First