CVE-2023-43642

7.5 HIGH

📋 TL;DR

The snappy-java library is vulnerable to denial of service attacks when processing compressed data with maliciously large chunk sizes. This affects all Java applications using snappy-java for compression/decompression. Attackers can cause unrecoverable fatal errors by sending specially crafted compressed data.

💻 Affected Systems

Products:
  • snappy-java
Versions: All versions up to and including 1.1.10.3
Operating Systems: All operating systems running Java
Default Config Vulnerable: ⚠️ Yes
Notes: Any Java application using SnappyInputStream for decompression is vulnerable regardless of configuration

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption causing application crashes and unavailability

🟠

Likely Case

Service degradation or crashes when processing untrusted compressed data

🟢

If Mitigated

Minimal impact if only trusted data sources are used

🌐 Internet-Facing: HIGH - Any service accepting compressed data from external sources is vulnerable
🏢 Internal Only: MEDIUM - Internal services could be impacted by malicious internal actors or compromised systems

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending malicious compressed data to vulnerable endpoints

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.1.10.4

Vendor Advisory: https://github.com/xerial/snappy-java/security/advisories/GHSA-55g7-9cwv-5qfv

Restart Required: Yes

Instructions:

1. Update pom.xml or build.gradle to use snappy-java version 1.1.10.4 or higher
2. Run dependency update command (mvn clean install or gradle build)
3. Restart affected Java applications

🔧 Temporary Workarounds

Input validation and filtering

all

Implement input validation to reject compressed data from untrusted sources

🧯 If You Can't Patch

  • Implement strict input validation to only accept compressed data from trusted sources
  • Deploy network filtering to block suspicious compressed data patterns

🔍 How to Verify

Check if Vulnerable:

Check dependency manifest for snappy-java version <= 1.1.10.3

Check Version:

mvn dependency:tree | grep snappy-java OR gradle dependencies | grep snappy-java

Verify Fix Applied:

Verify snappy-java version is >= 1.1.10.4 in dependency manifest

📡 Detection & Monitoring

Log Indicators:

  • Java application crashes with OutOfMemoryError or similar exceptions
  • Unusual decompression failures in application logs

Network Indicators:

  • Large compressed payloads sent to decompression endpoints
  • Sudden spikes in decompression-related traffic

SIEM Query:

source="application.logs" AND ("OutOfMemoryError" OR "SnappyInputStream" OR "decompression failed")

🔗 References

📤 Share & Export