# CVE-2023-37464: Incorrect Authentication Tag length usage in AES GCM decryption in OpenIDC/cjose

> An attacker can modify encrypted data by exploiting incorrect authentication tag length validation in AES GCM decryption within the cjose library.

- **Severity:** High 8.6 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Jul 2023
- **Updated:** 13 Feb 2025
- **Also known as:** ALSA-2023:4411, ALSA-2023:4418, AZL-27659, AZL-36936, CLEANSTART-2024-IV40707, DEBIAN-CVE-2023-37464, DLA-3515-1, DSA-5472-1, GHSA-3rhg-3gf2-6xgj, MGASA-2023-0350, OESA-2023-1441, RHSA-2023:4408, RHSA-2023:4409, RHSA-2023:4410, RHSA-2023:4411, RHSA-2023:4417, RHSA-2023:4418, RHSA-2023:4429, RLSA-2023:4418, SUSE-SU-2023:3030-1, SUSE-SU-2023:3230-1, UBUNTU-CVE-2023-37464, USN-6307-1, openSUSE-SU-2024:13052-1

## What is CVE-2023-37464?

CVE-2023-37464 is a high-severity vulnerability in OpenIDC cjose, published on 14 Jul 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

OpenIDC/cjose is a C library implementing the Javascript Object Signing and Encryption (JOSE). The AES GCM decryption routine incorrectly uses the Tag length from the actual Authentication Tag provided in the JWE. The spec  says that a fixed length of 16 octets must be applied. Therefore this bug allows an attacker to provide a truncated Authentication Tag and to modify the JWE accordingly. Users should upgrade to a version >= 0.6.2.2. Users unable to upgrade should avoid using AES GCM encryption and replace it with another encryption algorithm (e.g. AES CBC).

Weakness: CWE-327 (Use of a Broken or Risky Cryptographic Algorithm)

## Which versions are affected by CVE-2023-37464?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cjose` | AlmaLinux:8 | All versions | 0.6.1-3.module_el8.8.0+3591+c9939da8 |
| `cjose-devel` | AlmaLinux:8 | All versions | 0.6.1-3.module_el8.8.0+3591+c9939da8 |
| `mod_auth_openidc` | AlmaLinux:8 | All versions | 2.4.9.4-1.module_el8.7.0+3305+9a59f0c3 |
| `cjose` | AlmaLinux:9 | All versions | 0.6.1-13.el9_2.alma |
| `cjose` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.6.1-3.module+el8.8.0+19464+578f4546 |
| `cjose-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.6.1-3.module+el8.8.0+19464+578f4546 |
| `cjose-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.6.1-3.module+el8.8.0+19464+578f4546 |
| `cjose-devel` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.6.1-3.module+el8.8.0+19464+578f4546 |
| `mod_auth_openidc` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.4.9.4-1.module+el8.7.0+14797+4085fcb6 |
| `mod_auth_openidc-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.4.9.4-1.module+el8.7.0+14797+4085fcb6 |
| `mod_auth_openidc-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.4.9.4-1.module+el8.7.0+14797+4085fcb6 |
| `cjose` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.6.1-13.el9_2 |
| `cjose-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.6.1-13.el9_2 |
| `cjose-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.6.1-13.el9_2 |
| `cjose` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:0.6.1-3.module+el8.2.0+19461+3a40b6ee |
| `cjose-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:0.6.1-3.module+el8.2.0+19461+3a40b6ee |
| `cjose-debugsource` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:0.6.1-3.module+el8.2.0+19461+3a40b6ee |
| `cjose-devel` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:0.6.1-3.module+el8.2.0+19461+3a40b6ee |
| `mod_auth_openidc` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:2.3.7-4.module+el8.2.0+6919+ac02cfd2.3 |
| `mod_auth_openidc-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:2.3.7-4.module+el8.2.0+6919+ac02cfd2.3 |
| `mod_auth_openidc-debugsource` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:2.3.7-4.module+el8.2.0+6919+ac02cfd2.3 |
| `cjose` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:0.6.1-3.module+el8.4.0+19462+14bde120 |
| `cjose-debuginfo` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:0.6.1-3.module+el8.4.0+19462+14bde120 |
| `cjose-debugsource` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:0.6.1-3.module+el8.4.0+19462+14bde120 |
| `cjose-devel` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:0.6.1-3.module+el8.4.0+19462+14bde120 |
| `mod_auth_openidc` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:2.3.7-8.module+el8.4.0+9707+f2438af7 |
| `mod_auth_openidc-debuginfo` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:2.3.7-8.module+el8.4.0+9707+f2438af7 |
| `mod_auth_openidc-debugsource` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:2.3.7-8.module+el8.4.0+9707+f2438af7 |
| `cjose` | Red Hat:rhel_e4s:8.1::appstream | All versions | 0:0.6.1-3.module+el8.1.0+19504+b2d26fa1 |
| `cjose-debuginfo` | Red Hat:rhel_e4s:8.1::appstream | All versions | 0:0.6.1-3.module+el8.1.0+19504+b2d26fa1 |
| `cjose-debugsource` | Red Hat:rhel_e4s:8.1::appstream | All versions | 0:0.6.1-3.module+el8.1.0+19504+b2d26fa1 |
| `cjose-devel` | Red Hat:rhel_e4s:8.1::appstream | All versions | 0:0.6.1-3.module+el8.1.0+19504+b2d26fa1 |
| `mod_auth_openidc` | Red Hat:rhel_e4s:8.1::appstream | All versions | 0:2.3.7-4.module+el8.1.0+19504+b2d26fa1.3 |
| `mod_auth_openidc-debuginfo` | Red Hat:rhel_e4s:8.1::appstream | All versions | 0:2.3.7-4.module+el8.1.0+19504+b2d26fa1.3 |
| `mod_auth_openidc-debugsource` | Red Hat:rhel_e4s:8.1::appstream | All versions | 0:2.3.7-4.module+el8.1.0+19504+b2d26fa1.3 |
| `cjose` | Red Hat:rhel_e4s:8.2::appstream | All versions | 0:0.6.1-3.module+el8.2.0+19461+3a40b6ee |
| `cjose-debuginfo` | Red Hat:rhel_e4s:8.2::appstream | All versions | 0:0.6.1-3.module+el8.2.0+19461+3a40b6ee |
| `cjose-debugsource` | Red Hat:rhel_e4s:8.2::appstream | All versions | 0:0.6.1-3.module+el8.2.0+19461+3a40b6ee |
| `cjose-devel` | Red Hat:rhel_e4s:8.2::appstream | All versions | 0:0.6.1-3.module+el8.2.0+19461+3a40b6ee |
| `mod_auth_openidc` | Red Hat:rhel_e4s:8.2::appstream | All versions | 0:2.3.7-4.module+el8.2.0+6919+ac02cfd2.3 |

Products: Cisco Cjose.

## How do I fix CVE-2023-37464?

Upgrade to a fixed version.

## Is CVE-2023-37464 being exploited?

There is no known exploitation of CVE-2023-37464 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-37464 and fix it if it is affected.

What it is: CVE-2023-37464 is a high-severity vulnerability in OpenIDC cjose, published on 14 Jul 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-37464 in the wild and no public exploit code.

Affected product: OpenIDC cjose. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-37464/ (Markdown: https://insights.sbomify.com/CVE-2023-37464/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-37464
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-37464
- OSV: https://osv.dev/vulnerability/CVE-2023-37464

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-37464/
Summaries are generated and may contain mistakes; the official description above is the record.
