CVE-2023-42447

8.6 HIGH

📋 TL;DR

CVE-2023-42447 is a denial-of-service vulnerability in blurhash-rs, a Rust library for encoding images into ASCII strings. Attackers can craft malicious blurhash strings containing multi-byte UTF-8 characters to trigger panics and crash applications. Any system using blurhash-rs version 0.1.1 to parse untrusted input is affected.

💻 Affected Systems

Products:
  • blurhash-rs
Versions: version 0.1.1
Operating Systems: All operating systems running Rust applications
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using blurhash-rs 0.1.1 to parse blurhash strings from untrusted sources is vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete application crash leading to denial of service, potentially disrupting critical services that rely on image processing functionality.

🟠

Likely Case

Service disruption through application crashes when processing malicious blurhash strings, requiring manual restart of affected services.

🟢

If Mitigated

Minimal impact if input validation or rate limiting prevents malicious strings from reaching vulnerable code.

🌐 Internet-Facing: HIGH - The vulnerability can be triggered by feeding malicious blurhash strings over the network to internet-facing services.
🏢 Internal Only: MEDIUM - Internal systems could still be affected if they process untrusted blurhash strings from internal sources.

🎯 Exploit Status

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

Exploitation requires sending specially crafted blurhash strings containing multi-byte UTF-8 characters to trigger out-of-bounds accesses.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.2.0

Vendor Advisory: https://github.com/whisperfish/blurhash-rs/security/advisories/GHSA-cxvp-82cq-57h2

Restart Required: Yes

Instructions:

1. Update Cargo.toml to require blurhash-rs >= 0.2.0
2. Run 'cargo update' to fetch the new version
3. Update code to accommodate API changes in version 0.2.0
4. Rebuild and redeploy the application
5. Restart affected services

🔧 Temporary Workarounds

Input validation

all

Implement strict input validation to reject blurhash strings containing multi-byte UTF-8 characters before they reach the vulnerable parsing code.

🧯 If You Can't Patch

  • Implement network-level filtering to block or sanitize blurhash strings containing multi-byte UTF-8 characters
  • Deploy rate limiting to prevent mass exploitation attempts and contain potential denial-of-service impact

🔍 How to Verify

Check if Vulnerable:

Check Cargo.toml or Cargo.lock for blurhash-rs dependency version 0.1.1. Run 'cargo tree | grep blurhash-rs' to verify installed version.

Check Version:

cargo tree | grep blurhash-rs

Verify Fix Applied:

Confirm blurhash-rs version is 0.2.0 or higher in Cargo.lock. Test with known malicious blurhash strings to ensure no panics occur.

📡 Detection & Monitoring

Log Indicators:

  • Application panic logs mentioning blurhash-rs
  • Sudden service restarts after processing blurhash strings
  • Error logs containing 'index out of bounds' or similar memory access errors

Network Indicators:

  • Unusual patterns of blurhash string submissions
  • High volume of requests containing UTF-8 multi-byte characters

SIEM Query:

source="application.logs" AND ("blurhash-rs" OR "panic" OR "out of bounds") AND "blurhash"

🔗 References

📤 Share & Export