GHSA-5739-39v2-5754: PHP JWT Library RSA1_5 (RSAES-PKCS1-v1_5) Decryption Lacks Implicit Vulnerability
MODERATEGHSA-5739-39v2-5754 is a MODERATE rsa1_5 (rsaes-pkcs1-v1_5) decryption lacks implicit vulnerability (CWE-385: Covert Timing Channel) affecting PHP JWT Library libraries in the Packagist ecosystem. The issue involves rsa1_5 (rsaes-pkcs1-v1_5) decryption lacks implicit rejection, exposing a bleichenbacher/marvin padding oracle. Remediation is available by upgrading affected packages to version 3.4.10, 4.0.7, 4.1.7.
GHSA-5739-39v2-5754 at a Glance
How to Fix GHSA-5739-39v2-5754
To remediate this vulnerability, upgrade all affected PHP JWT Library dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade web-token/jwt-library to 3.4.10
Upgrade web-token/jwt-library to 4.0.7
Upgrade web-token/jwt-library to 4.1.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for web-token/jwt-library
How to Check if You Are Affected
To determine whether your application is affected by GHSA-5739-39v2-5754, inspect your project dependencies for PHP JWT Library:
inspect dependencies for web-token/jwt-library
Analyze the terminal output to locate any version of PHP JWT Library in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.4.10), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-385: Covert Timing Channel, where covert timing channels convey information by modulating some aspect of system behavior over time, so that the program receiving the information can observe system behavior and infer protected information. In PHP JWT Library, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-5739-39v2-5754 Affected PHP JWT Library Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
web-token/jwt-library
|
Packagist |
< 3.4.10
|
3.4.10
|
|
web-token/jwt-library
|
Packagist |
≥ 4.0.0
< 4.0.7
|
4.0.7
|
|
web-token/jwt-library
|
Packagist |
≥ 4.1.0
< 4.1.7
|
4.1.7
|
References
Frequently Asked Questions
What is GHSA-5739-39v2-5754?
Which PHP JWT Library versions are affected?
What version fixes GHSA-5739-39v2-5754?
Is web-token/jwt-library affected?
What CWE is associated with GHSA-5739-39v2-5754?
How can I check Packagist dependencies for GHSA-5739-39v2-5754?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5739-39v2-5754",
"modified" : "2026-08-31T14:52:45Z",
"published" : "2026-06-18T21:09:56Z",
"aliases" : [ ],
"summary" : "PHP JWT Library: RSA1_5 (RSAES-PKCS1-v1_5) decryption lacks implicit rejection, exposing a Bleichenbacher/Marvin padding oracle",
"details" : "### Impact\n\n`RSACrypt::decryptWithRSA15()` (used by the `RSA1_5` key-encryption algorithm) implements RSAES-PKCS1-v1_5 decryption by inspecting the padding after RSADP and throwing `InvalidArgumentException` as soon as the padding is malformed. It does **not** implement the implicit-rejection countermeasure required by RFC 3447 §7.2.2 / RFC 8017 §7.1.2 (return a deterministic pseudo-random value of the expected length on padding failure and let the downstream step fail uniformly).\n\nFrom a JWE caller this yields a Bleichenbacher/Marvin padding oracle: an attacker submitting adaptively crafted `encrypted_key` values can distinguish (a) padding rejected, (b) padding valid but wrong CEK length, and (c) padding valid and full AEAD executed — even though `JWEDecrypter` returns the same `false` in all cases — because each path performs a measurably different amount of work, amplifiable by enlarging the ciphertext (CWE-208 timing side channel). Enough adaptive queries can recover the wrapped CEK.\n\n### Affected configurations\n\nApplications that register `RSA1_5` in their decryption `AlgorithmManager` and hold an RSA private key.\n\n### Patches\n\nPKCS#1 v1.5 decryption now performs implicit rejection: on invalid padding (or unexpected recovered length) it returns a random CEK of the expected size selected in constant time, so the full content-decryption (AEAD) step always runs and fails uniformly, removing the observable difference between padding-valid and padding-invalid ciphertexts. Users are still strongly encouraged to migrate to `RSA-OAEP`.\n\n### Workarounds\n\nPrefer `RSA-OAEP`/`RSA-OAEP-256`; do not enable `RSA1_5` for untrusted tokens.\n\n### References\n\n- RFC 3447 §7.2.2 / RFC 8017 §7.1.2\n- Bleichenbacher (1998); Marvin attack\n- CWE-208: Observable Timing Discrepancy\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**RSA1_5** — déchiffrement PKCS#1 v1.5 avec *implicit rejection* en temps constant (RFC 3447 §7.2.2) : un padding invalide n'est plus distinguable d'un padding valide, neutralisant l'oracle Bleichenbacher.\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`.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "web-token/jwt-library"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.4.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "web-token/jwt-library"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "web-token/jwt-library"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.0"
}, {
"fixed" : "4.1.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/web-token/jwt-framework/security/advisories/GHSA-5739-39v2-5754"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/web-token/jwt-library/GHSA-5739-39v2-5754.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/web-token/jwt-framework"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-208", "CWE-385" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-18T21:09:56Z",
"nvd_published_at" : null
}
}