{"answers":{"affected":"8 open source packages ship an affected version, including web-token/jwt-experimental and web-token/jwt-library.","exploited":"There is no known exploitation of GHSA-6vvh-pxr4-25r7 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"GHSA-6vvh-pxr4-25r7 is a vulnerability in web-token/jwt-experimental, published on 18 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-6vvh-pxr4-25r7 and fix it if it is affected.\n\nWhat it is: GHSA-6vvh-pxr4-25r7 is a vulnerability in web-token/jwt-experimental, published on 18 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-6vvh-pxr4-25r7 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- web-token/jwt-experimental (Packagist): affected all versions up to 4.1.6; no fix listed\n- web-token/jwt-experimental (Packagist): affected all versions up to 4.1.6; no fix listed\n- web-token/jwt-library (Packagist): affected all versions; fixed in 3.4.10\n- web-token/jwt-library (Packagist): affected all versions; fixed in 3.4.10\n- web-token/jwt-library (Packagist): affected from 4.0.0; fixed in 4.0.7\n- web-token/jwt-library (Packagist): affected from 4.0.0; fixed in 4.0.7\n- web-token/jwt-library (Packagist): affected from 4.1.0; fixed in 4.1.7\n- web-token/jwt-library (Packagist): affected from 4.1.0; fixed in 4.1.7\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-6vvh-pxr4-25r7/ (Markdown: https://insights.sbomify.com/GHSA-6vvh-pxr4-25r7/index.md)","id":"GHSA-6vvh-pxr4-25r7","markdown":"https://insights.sbomify.com/GHSA-6vvh-pxr4-25r7/index.md","name":"GHSA-6vvh-pxr4-25r7","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"PHP JWT library","requires_auth":"none","summary":"An attacker can tamper with encrypted JWT keys without detection because the authentication tag is discarded, bypassing integrity checks.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n\nThe experimental `Chacha20Poly1305` key-encryption algorithm generates the 16-byte Poly1305 authentication tag during `encryptKey()` but **discards it**: the tag is never written to the header and therefore never reaches the wire. On the receiving side, `decryptKey()` calls `openssl_decrypt('chacha20-poly1305', ...)` **without the tag argument**, which makes OpenSSL skip authentication entirely.\n\nAs a result the AEAD construction is silently degraded to unauthenticated ChaCha20: a tampered encrypted CEK is accepted, and because ChaCha20 is a stream cipher, a single-byte change in the ciphertext propagates as a single-byte change in the recovered CEK with no integrity check (CWE-353 / CWE-347). An attacker on the token path can manipulate the wrapped key without detection.\n\n### Affected configurations\n\nApplications that register `Jose\\Experimental\\KeyEncryption\\Chacha20Poly1305` (package `web-token/jwt-experimental`) as a JWE `alg`.\n\n### Patches\n\n`encryptKey()` now publishes the Poly1305 tag as the base64url `tag` header parameter (and asserts it is 16 bytes). `decryptKey()` requires the `tag` header, validates its length, and passes it to `openssl_decrypt()` so the tag is actually verified, in line with RFC 7539 / RFC 8439. Tampering now results in a decryption failure.\n\n\u003e Note: this changes the wire format of tokens produced with this experimental algorithm (a `tag` header is now emitted and required).\n\n### Workarounds\n\nDo not use the experimental `Chacha20Poly1305` key-encryption algorithm for untrusted input until upgraded.\n\n### References\n\n- RFC 7539 / RFC 8439 (ChaCha20-Poly1305 AEAD)\n- CWE-353: Missing Support for Integrity Check\n\n## Résolution\n\nUn correctif a été préparé sur une branche dédiée basée sur `3.4.x`, avec des tests anti-régression dédiés (fork privé temporaire de cette advisory, PR #1).\n\n**ChaCha20-Poly1305** — le tag d'authentification Poly1305 est désormais publié dans le header au chiffrement et vérifié au déchiffrement (RFC 7539), rétablissant l'intégrité AEAD.\n\n**Validation :** `php -l` OK, PHPUnit vert, aucune nouvelle erreur PHPStan introduite (différentiel nul vs `3.4.x`), aucun commentaire ajouté dans le code source. Après merge, cascade prévue `3.4.x → 4.0.x → 4.1.x`.","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Impact The experimental `Chacha20Poly1305` key-encryption algorithm generates the 16-byte Poly1305 authentication tag during `encryptKey","id":"GHSA-6vvh-pxr4-25r7","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"weak_cryptography","year":"2026"},"n_packages":8,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["4.1.6"],"package":"web-token/jwt-experimental","purl":null,"source":"GHSA-6vvh-pxr4-25r7"},{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["4.1.6"],"package":"web-token/jwt-experimental","purl":"pkg:composer/web-token/jwt-experimental","source":"GHSA-6vvh-pxr4-25r7"},{"ecosystem":"Packagist","fixed":["3.4.10"],"introduced":["0"],"last_affected":[],"package":"web-token/jwt-library","purl":null,"source":"GHSA-6vvh-pxr4-25r7"},{"ecosystem":"Packagist","fixed":["3.4.10"],"introduced":["0"],"last_affected":[],"package":"web-token/jwt-library","purl":"pkg:composer/web-token/jwt-library","source":"GHSA-6vvh-pxr4-25r7"},{"ecosystem":"Packagist","fixed":["4.0.7"],"introduced":["4.0.0"],"last_affected":[],"package":"web-token/jwt-library","purl":null,"source":"GHSA-6vvh-pxr4-25r7"},{"ecosystem":"Packagist","fixed":["4.0.7"],"introduced":["4.0.0"],"last_affected":[],"package":"web-token/jwt-library","purl":"pkg:composer/web-token/jwt-library","source":"GHSA-6vvh-pxr4-25r7"},{"ecosystem":"Packagist","fixed":["4.1.7"],"introduced":["4.1.0"],"last_affected":[],"package":"web-token/jwt-library","purl":null,"source":"GHSA-6vvh-pxr4-25r7"},{"ecosystem":"Packagist","fixed":["4.1.7"],"introduced":["4.1.0"],"last_affected":[],"package":"web-token/jwt-library","purl":"pkg:composer/web-token/jwt-library","source":"GHSA-6vvh-pxr4-25r7"}],"products":null,"published":"2026-06-18","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An attacker can tamper with encrypted JWT keys without detection because the authentication tag is discarded, bypassing integrity checks.","url":"https://insights.sbomify.com/GHSA-6vvh-pxr4-25r7/"}