Logo van Auditing Jwt Verification And Key Trust

Auditing Jwt Verification And Key Trust

Organisatie
UnboundCompute
auditing-jwt-verification-and-key-trust

Controleer hoe een service JSON Web Tokens verifieert op klassieke verificatieomzeilingen: een aanval met algoritmeverwarring waarbij een token het ondertekeningsalgoritme wijzigt, zodat een publieke sleutel als symmetrisch geheim wordt gebruikt of het algoritme op none wordt gezet; een sleutel die wordt geselecteerd op basis van een door een aanvaller te beïnvloeden header (een key ID, een JWKS-URL of een ingesloten sleutel), zodat het token zelf zijn ondertekenaar aanwijst; een handtekening die wordt gedecodeerd maar niet daadwerkelijk wordt geverifieerd; en claims (vervaldatum, uitgever, doelgroep) die worden uitgelezen maar niet afgedwongen. Dit omvat services die JWT's accepteren en verifiëren om een aanroeper te authenticeren of autoriseren. Gebruik dit wanneer een JWT het toegangsbewijs is en de verificatie ervan de beveiligingsgrens vormt. Het vervalste of niet-geverifieerde token is de bron, de geauthenticeerde of geautoriseerde actie die het mogelijk maakt is het doel, en de algoritmeverwarring, door de aanvaller gekozen sleutel of niet-geverifieerde claim waardoor het wordt geaccepteerd, is de kwetsbaarheid.

Overzicht

UitgeverUnboundCompute
Repositorysecurity-agent-skills
Skillnaamauditing-jwt-verification-and-key-trust
Sterren
27
Forks
8
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door UnboundCompute op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Auditing Jwt Verification And Key Trust in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-jwt-verification-and-key-trust
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-jwt-verification-and-key-trust .claude/skills/auditing-jwt-verification-and-key-trust
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Auditing Jwt Verification And Key Trust in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Auditing Jwt Verification And Key Trust automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Auditing Jwt Verification And Key Trust niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Auditing JWT verification and key trust: the token names its own signer unless you stop it

A JSON Web Token is a signed claim, and its security is entirely in how the verifier checks the signature and the claims. The failures are a small, famous set, and they recur because the token itself carries the parameters an attacker wants to control. The algorithm lives in the token header, so a verifier that trusts it can be steered into algorithm confusion, verifying an RS256 token as HS256 using the public key as the shared secret, or accepting an algorithm of none with no signature at all. The key can be selected from the header too, a key id, a JWKS URL, or an embedded key, so a token can name a signer the attacker controls. A verifier that decodes the token and reads the claims but never actually checks the signature accepts anything. And a verifier that checks the signature but not the expiry, issuer, and audience honors expired or wrong-context tokens. The audit pins the algorithm and key on the server side and confirms the signature and claims are enforced. You audit this by presenting manipulated tokens and confirming each is refused.

When to use

  • A service accepts JWTs and verifies them to authenticate or authorize a caller.
  • The signing algorithm or key may be chosen from token-supplied fields (alg, kid, jku, embedded key).
  • Claims such as expiry, issuer, and audience may be parsed but not enforced during verification.

Scope check

Test JWT verification only against services you own or are authorized to assess, on non-production tokens and accounts. Forging tokens attempts real authentication, so use non-production credentials and never use a forged token to reach real data. If you can't name the authorization, stop.

The loop

  1. Establish the intended algorithm and key first. Name the exact algorithm the service should accept and the specific key or key set it should verify against, both fixed on the server side. This is the false-positive killer: a verifier that pins the algorithm, selects the key from server configuration or a pinned trusted key set, verifies the signature, and enforces expiry, issuer, and audience is correct. Name the intended algorithm and key, then test manipulation.

  2. Test algorithm confusion and none. Present a token whose header switches the algorithm: an RS256 token re-signed as HS256 using the public key as the secret, and a token with the algorithm set to none and no signature. Confirm the verifier rejects any algorithm other than the one it expects and never accepts none. A verifier that honors the header's algorithm is steerable into using the wrong verification path.

  3. Test attacker-chosen key selection. Check whether the key is selected from a token-supplied field: a key id that indexes an attacker-influenceable store or path, a JWKS URL the token names so the server fetches the attacker's key, or an embedded key the token carries. Present tokens that manipulate each and confirm the server ignores token-supplied key hints and uses only its pinned trusted keys.

  4. Confirm the signature is actually verified. Confirm the code verifies the signature rather than merely decoding the token and reading claims. Present a token with a valid structure but an invalid signature and confirm it is rejected. A decode-without-verify path accepts any well-formed token regardless of signature.

  5. Check claim enforcement. Confirm the verifier enforces expiry (and not-before), issuer, and audience, not just parses them. Present an expired token, one from the wrong issuer, and one for a different audience, and confirm each is refused. A signature-valid token with an unenforced claim is honored outside its intended time or context.

  6. Confirm and record. Confirm by getting a manipulated token accepted, an algorithm-confused or none token, one signed by an attacker-named key, one with an unverified signature, or an expired or wrong-audience token, on non-production accounts and without reaching real data. Kill the lead if the verifier pins the algorithm, uses only server-side trusted keys, verifies the signature, and enforces expiry, issuer, and audience. Record the forged token, the authenticated or authorized action sink, and the algorithm confusion, attacker-chosen key, or unverified claim that accepted it.

Where JWT verification leaks

  • Algorithm from the header enables confusion. Trusting the token's algorithm allows RS256-to-HS256 confusion using the public key as the secret, or an algorithm of none with no signature.
  • Key from the token names its own signer. A key id, a JWKS URL, or an embedded key taken from the token lets an attacker point verification at a key they control.
  • Decode is not verify. Reading the claims without checking the signature accepts any well-formed token.
  • Parsed claims are not enforced claims. Expiry, issuer, and audience read but not checked honor expired or wrong-context tokens.
  • A valid signature is not sufficient authorization. A correctly signed token still must match the expected issuer, audience, and time to authorize this action.

Worked example (a confirm and a kill)

Confirm. A service verifies RS256 tokens but selects the verification algorithm from the token header. A token re-signed as HS256, using the service's known public key as the HMAC secret, is accepted because the verifier runs the HMAC path with the public key. The forged token authenticates as an arbitrary user. Confirmed JWT algorithm-confusion authentication bypass, critical, remediation = pin the accepted algorithm to exactly RS256 on the server, reject any other algorithm and none, and never derive the verification key or algorithm from token-supplied fields.

Kill. The verifier accepts only the one configured algorithm, rejects none and any mismatch, selects the key solely from a pinned trusted key set ignoring the token's key id, JWKS URL, and embedded key, verifies the signature on every token, and enforces expiry, issuer, and audience. An algorithm-confused, wrong-key, unsigned, expired, or wrong-audience token is refused. Killed, kill_reason = "algorithm pinned, key taken only from server-side trusted set, signature verified, and claims enforced; no manipulated token authenticates."

Rationalizations to reject

  • "The library verifies the token." → Confirm it pins the algorithm and ignores token-supplied keys; many verify paths honor the header's algorithm and key hints unless configured not to.
  • "We use RS256." → Confirm the server rejects a token that claims HS256 or none; accepting the header's algorithm is exactly the confusion attack.
  • "The key id tells us which key." → A token-supplied key id, JWKS URL, or embedded key is attacker input; select the key from your trusted set, never from the token.
  • "We read the claims." → Reading is not verifying; confirm the signature is checked and expiry, issuer, and audience are enforced, not just parsed.
  • "The signature is valid." → A valid signature proves origin, not context; enforce issuer, audience, and expiry so the token authorizes only this action now.

Executing this in practice

You need the algorithm the service accepts, how the verification key is selected, whether the signature is actually verified, and which claims are enforced. For each, present an algorithm-confused or none token, a token naming an attacker-controlled key, an invalid-signature token, and expired and wrong-audience tokens. Reading the verification code shows the intended pinning; a manipulated token accepted shows whether it holds.

Related

  • auditing-oauth-token-audience-and-scope-trust - the audience and scope layer above verification; a token must verify here before its audience and scope can be trusted there.
  • auditing-saml-and-oidc-federation-trust - OIDC ID tokens are JWTs, so this verification is the mechanism underneath that skill's issuer and audience checks.
  • auditing-webhook-authenticity-and-callback-trust - signed webhooks share the verify-the-signature-and-the- claims discipline; the same decode-without-verify and key-trust mistakes appear there.
  • hunting-non-human-identity-and-secret-reachability - the signing key is a high-value secret; that skill traces who can reach it, which decides whether forgery is even needed.
  • FINDING-SCHEMA.md - source = the forged or unverified token, sink = the authenticated or authorized action it grants, evidence = the algorithm confusion, attacker-chosen key, or unverified claim that accepted it.

Veelgestelde vragen

Wat doet de AI-skill Auditing Jwt Verification And Key Trust?

Controleer hoe een service JSON Web Tokens verifieert op klassieke verificatieomzeilingen: een aanval met algoritmeverwarring waarbij een token het ondertekeningsalgoritme wijzigt, zodat een publieke sleutel als symmetrisch geheim wordt gebruikt of het algoritme op none wordt gezet; een sleutel die wordt geselecteerd op basis van een door een aanvaller te beïnvloeden header (een key ID, een JWKS-URL of een ingesloten sleutel), zodat het token zelf zijn ondertekenaar aanwijst; een handtekening die wordt gedecodeerd maar niet daadwerkelijk wordt geverifieerd; en claims (vervaldatum, uitgever,...

Waarom Auditing Jwt Verification And Key Trust gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Auditing Jwt Verification And Key Trust bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Auditing Jwt Verification And Key Trust in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-jwt-verification-and-key-trust. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Auditing Jwt Verification And Key Trust gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Auditing Jwt Verification And Key Trust gebruiken?

Zoveel als je wilt. Je kunt Auditing Jwt Verification And Key Trust gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Auditing Jwt Verification And Key Trust gratis?

Ja. Deze skill is door UnboundCompute op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇