CVE-2024-21664
NixOS vulnerability analysis and mitigation

Overview

CVE-2024-21664 affects the jwx Go module, which implements various JWx (JWA/JWE/JWK/JWS/JWT, otherwise known as JOSE) technologies. The vulnerability was discovered and disclosed in January 2024, specifically affecting versions prior to 2.0.19 and 1.2.28. The issue occurs when calling jws.Parse with a JSON serialized payload where the signature field is present while protected is absent, leading to a nil pointer dereference (GitHub Advisory, NVD).

Technical details

The vulnerability stems from an assumption in the jws/message.go:UnmarshalJSON() function that if a signature field is present, then a protected field must also be present. When this assumption is violated, the subsequent call to getB64Value(sig.protected) attempts to dereference sig.protected, which is nil, resulting in a panic. The issue affects both the jws.Parse function directly and other functions that call Parse internally, such as jws.Verify. The vulnerability has been assigned a CVSS v3.1 base score of 4.3 (Medium) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L (GitHub Advisory).

Impact

The vulnerability can be exploited to cause a Denial of Service (DoS) condition by crashing systems performing JWS verification. The impact is limited to availability, with no direct effect on confidentiality or integrity of the system (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in versions 2.0.19 and 1.2.28. Users should upgrade to these or later versions. The fix ensures that jws.Parse function succeeds in parsing a JWS message lacking a protected header, while jws.Verify on such messages will result in a failed verification attempt rather than a panic (NVD).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22783HIGH8.1
  • NixOSNixOS
  • iris
NoYesJan 12, 2026
CVE-2026-0821MEDIUM6.9
  • NixOSNixOS
  • quickjs
NoNoJan 10, 2026
CVE-2025-68949MEDIUM5.3
  • NixOSNixOS
  • n8n
NoYesJan 13, 2026
CVE-2026-22784LOW2.3
  • NixOSNixOS
  • lychee
NoYesJan 12, 2026
CVE-2026-23497LOW1.3
  • NixOSNixOS
  • learning
NoYesJan 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management