CVE-2017-12974: Improper Verification of Cryptographic Signature in Nimbus JOSE+JWT

com.nimbusds:nimbus-jose-jwt Updated 02 Oct 2025

Summary

13/05/2022
Yes i
High
7.5

CVE-2017-12974: Improper Verification of Cryptographic Signature in Nimbus JOSE+JWT. Affects com.nimbusds:nimbus-jose-jwt versions < 4.36. Fixed in 4.36. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Nimbus JOSE+JWT is a Java library that provides support for JSON Web Tokens (JWT) and JSON Object Signing and Encryption (JOSE). It is commonly used for implementing secure authentication and authorization mechanisms in Java applications. However, a vulnerability has been identified in versions prior to 4.36 of the library.

Vulnerability Detail

The vulnerability in Nimbus JOSE+JWT before version 4.36 arises from the improper verification of cryptographic signatures. Specifically, the library constructs ECKey objects without ensuring that the public x and y coordinates are on the specified curve. This oversight allows attackers to exploit an Invalid Curve Attack in environments where the JCE provider lacks the applicable curve validation. The impact of this vulnerability can be significant, potentially leading to unauthorized access, data tampering, or other security breaches.

How To Fix

Latest published version: 10.10 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.36

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a possible workaround is to manually validate the public key coordinates against the specified curve before constructing the ECKey object. Here is an example of how this can be done using the Bouncy Castle library:

import org.bouncycastle.jce.ECNamedCurveTable;
import org.bouncycastle.jce.spec.ECParameterSpec;

// Retrieve the ECParameterSpec for the specified curve
ECParameterSpec curveParams = ECNamedCurveTable.getParameterSpec("secp256r1");

// Validate the public key coordinates against the curve
if (!curveParams.getCurve().isValidPoint(publicKey.getX(), publicKey.getY())) {
    throw new InvalidKeyException("Invalid public key coordinates");
}

// Construct the ECKey object
ECKey ecKey = new ECKey.Builder(curveParams, publicKey).build();

Note that this workaround requires the Bouncy Castle library as a dependency.

Conclusion

In conclusion, the vulnerability in Nimbus JOSE+JWT before version 4.36 allows for an Invalid Curve Attack due to improper verification of cryptographic signatures. It is crucial to upgrade to the latest version or apply the provided workaround to mitigate the risk of unauthorized access or data tampering. For further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for com.nimbusds:nimbus-jose-jwt →

Share this vulnerability

FAQ

Nimbus JOSE+JWT is a Java library that provides support for JSON Web Tokens (JWT) and JSON Object Signing and Encryption (JOSE). It is commonly used for implementing secure authentication and authorization mechanisms in Java applications.

The vulnerability allows attackers to conduct an Invalid Curve Attack, potentially leading to unauthorized access, data tampering, or other security breaches.

To fix this vulnerability, it is recommended to upgrade to version 4.36 or later of the Nimbus JOSE+JWT library. Developers should update their project dependencies and recompile their code.

If upgrading to the latest version is not immediately feasible, a possible workaround is to manually validate the public key coordinates against the specified curve before constructing the ECKey object. This can be done using the Bouncy Castle library.

For more information about this vulnerability, you can refer to the CVE-2017-12974 identifier or visit the GitHub Advisory Database at https://github.com/github/advisory-database.

Related vulnerabilities

Recent vulnerabilities recorded for com.nimbusds:nimbus-jose-jwt.

How To Fix

Latest published version: 10.10 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.36

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback