CVE-2024-57970

4.0 MEDIUM

📋 TL;DR

This vulnerability in libarchive allows attackers to cause a heap-based buffer over-read when processing specially crafted TAR archives with truncated GNU long linknames. This could lead to application crashes or information disclosure. Any system or application using vulnerable versions of libarchive to extract TAR archives is affected.

💻 Affected Systems

Products:
  • libarchive
Versions: All versions through 3.7.7
Operating Systems: All operating systems using libarchive
Default Config Vulnerable: ⚠️ Yes
Notes: Any application or system using libarchive to extract TAR archives is vulnerable when processing malicious archives.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Denial of service (application crash) or potential information disclosure from heap memory, possibly leading to further exploitation.

🟠

Likely Case

Application crash when processing malicious TAR archives, causing denial of service.

🟢

If Mitigated

Minimal impact if proper input validation and sandboxing are in place.

🌐 Internet-Facing: MEDIUM - Applications that process user-uploaded TAR archives from the internet are at risk.
🏢 Internal Only: LOW - Internal systems that don't process untrusted TAR archives have minimal exposure.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires crafting a malicious TAR archive with specific truncation in GNU long linknames.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in libarchive 3.7.8 and later

Vendor Advisory: https://github.com/libarchive/libarchive/pull/2422

Restart Required: Yes

Instructions:

1. Update libarchive to version 3.7.8 or later. 2. For Linux systems: Use package manager (apt-get update && apt-get upgrade libarchive, yum update libarchive, etc.). 3. For source installations: Download latest version from libarchive.org and recompile. 4. Restart any services using libarchive.

🔧 Temporary Workarounds

Disable TAR archive processing

all

Configure applications to avoid using libarchive for TAR extraction where possible

Input validation for TAR archives

all

Implement pre-processing validation for TAR archives before passing to libarchive

🧯 If You Can't Patch

  • Implement strict input validation for TAR archives from untrusted sources
  • Run applications using libarchive in sandboxed/isolated environments

🔍 How to Verify

Check if Vulnerable:

Check libarchive version: libarchive --version or dpkg -l | grep libarchive or rpm -qa | grep libarchive

Check Version:

libarchive --version | head -1

Verify Fix Applied:

Verify version is 3.7.8 or later using version check command

📡 Detection & Monitoring

Log Indicators:

  • Application crashes when processing TAR archives
  • Memory access violation errors in application logs

Network Indicators:

  • Unusual TAR archive uploads to web applications

SIEM Query:

source="application.log" AND ("segmentation fault" OR "memory violation" OR "buffer over-read") AND "tar"

🔗 References

📤 Share & Export