GHSA-RM8V-MXJ3-5RMQ

GHSA-RM8V-MXJ3-5RMQ is a medium-severity security vulnerability in github.com/lestrrat-go/jwx/v2 (go), affecting versions <= 2.0.10. It is fixed in 2.0.11, 1.2.26.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

github.com/lestrrat-go/jwx vulnerable to Potential Padding Oracle Attack

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":

https://github.com/lestrrat-go/jwx/blob/8840ffd4afc5839f591ff0e9ba9034af52b1643e/jwe/internal/aescbc/aescbc.go#L210-L213

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.

https://github.com/lestrrat-go/jwx/blob/796b2a9101cf7e7cb66455e4d97f3c158ee10904/jwe/internal/aescbc/aescbc.go#L33-L66

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 versions

github.com/lestrrat-go/jwx/v2 (<= 2.0.10) github.com/lestrrat-go/jwx (<= 1.2.25)

Security releases

github.com/lestrrat-go/jwx/v2 → 2.0.11 (go) github.com/lestrrat-go/jwx → 1.2.26 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

github.com/lestrrat-go/jwx/v2 to 2.0.11 or later; github.com/lestrrat-go/jwx to 1.2.26 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-RM8V-MXJ3-5RMQ? GHSA-RM8V-MXJ3-5RMQ is a medium-severity security vulnerability in github.com/lestrrat-go/jwx/v2 (go), affecting versions <= 2.0.10. It is fixed in 2.0.11, 1.2.26.
  2. Which packages are affected by GHSA-RM8V-MXJ3-5RMQ?
    • github.com/lestrrat-go/jwx/v2 (go) (versions <= 2.0.10)
    • github.com/lestrrat-go/jwx (go) (versions <= 1.2.25)
  3. Is there a fix for GHSA-RM8V-MXJ3-5RMQ? Yes. GHSA-RM8V-MXJ3-5RMQ is fixed in 2.0.11, 1.2.26. Upgrade to this version or later.
  4. Is GHSA-RM8V-MXJ3-5RMQ exploitable, and should I be worried? Whether GHSA-RM8V-MXJ3-5RMQ is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-RM8V-MXJ3-5RMQ is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-RM8V-MXJ3-5RMQ?
    • Upgrade github.com/lestrrat-go/jwx/v2 to 2.0.11 or later
    • Upgrade github.com/lestrrat-go/jwx to 1.2.26 or later

Other vulnerabilities in github.com/lestrrat-go/jwx/v2

Stop the waste.
Protect your environment with Kodem.