GHSA-rm8v-mxj3-5rmq — v2
Fix: lestrrat-go/jwx@6c41e38GHSA-rm8v-mxj3-5rmq is a security vulnerability in github.com/lestrrat-go/jwx/v2. A fix is available for github.com/lestrrat-go/jwx/v2 — see the affected versions and patch details below.
github.com/lestrrat-go/jwx vulnerable to Potential Padding Oracle Attack
Real-World Exposure
github.com/lestrrat-go/jwx/v2🐹github.com/lestrrat-go/jwxReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
Decrypting AES-CBC encrypted JWE has Potential Padding Oracle Attack Vulnerability.
Details
On v2.0.10, decrypting AES-CBC encrypted JWE may return an error "failed to generate plaintext from decrypted blocks: invalid padding":
Reporting padding error causes Padding Oracle Attack Vulnerability. RFC 7516 JSON Web Encryption (JWE) says that we MUST NOT do this.
11.5. Timing Attacks To mitigate the attacks described in RFC 3218 [RFC3218], the recipient MUST NOT distinguish between format, padding, and length errors of encrypted keys. It is strongly recommended, in the event of receiving an improperly formatted key, that the recipient substitute a randomly generated CEK and proceed to the next step, to mitigate timing attacks.
In addition, the time to remove padding depends on the length of the padding. It may leak the length of the padding by Timing Attacks.
To mitigate Timing Attacks, it MUST be done in constant time.
Impact
The authentication tag is verified, so it is not an immediate attack.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/lestrrat-go/jwx/v2 | all versions | 2.0.11go get github.com/lestrrat-go/jwx/v2@v2.0.11 |
| 🐹Go | github.com/lestrrat-go/jwx | all versions | 1.2.26go get github.com/lestrrat-go/jwx@v1.2.26 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/lestrrat-go/jwx/v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/lestrrat-go/jwx/v2 to 2.0.11 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-rm8v-mxj3-5rmq is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-rm8v-mxj3-5rmq can be triaged on real exposure rather than presence alone.
Tailored to GHSA-rm8v-mxj3-5rmq. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-rm8v-mxj3-5rmq in your dependencies?
O3 Security finds GHSA-rm8v-mxj3-5rmq across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.