CVE-2020-24295

8.8 HIGH

📋 TL;DR

CVE-2020-24295 is a buffer overflow vulnerability in FreeImage's PSD parser that allows remote attackers to execute arbitrary code by providing a specially crafted PSD file. This affects any application using FreeImage 3.19.0 to process PSD files, potentially leading to complete system compromise.

💻 Affected Systems

Products:
  • FreeImage
  • Applications using FreeImage library
Versions: FreeImage 3.19.0 (specifically revision r1859)
Operating Systems: All platforms where FreeImage is used (Linux, Windows, macOS)
Default Config Vulnerable: ⚠️ Yes
Notes: Any application that uses FreeImage to parse PSD files is vulnerable. This includes image processing tools, content management systems, and file upload handlers.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with full system compromise, allowing attackers to install malware, exfiltrate data, or create persistent backdoors.

🟠

Likely Case

Application crash leading to denial of service, with potential for limited code execution depending on memory protections.

🟢

If Mitigated

Application crash without code execution if ASLR/DEP are properly implemented and effective.

🌐 Internet-Facing: HIGH - Web applications processing user-uploaded PSD files are directly exposed to remote exploitation.
🏢 Internal Only: MEDIUM - Internal applications processing PSD files could be exploited via phishing or compromised internal systems.

🎯 Exploit Status

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

The vulnerability requires only a crafted PSD file to trigger. Public discussions and advisories indicate exploit details are available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FreeImage 3.19.0 with patch or later versions

Vendor Advisory: https://sourceforge.net/p/freeimage/discussion/36111/thread/afb98701eb/

Restart Required: Yes

Instructions:

1. Update FreeImage library to patched version. 2. Recompile applications using FreeImage. 3. Restart affected services. 4. Verify PSD file processing works correctly.

🔧 Temporary Workarounds

Disable PSD file processing

all

Configure applications to reject or not process PSD files through FreeImage

# Application-specific configuration required

Input validation for PSD files

all

Implement strict validation of PSD file headers before passing to FreeImage

# Custom validation logic required based on application

🧯 If You Can't Patch

  • Implement network segmentation to isolate systems processing PSD files
  • Deploy application firewalls to inspect and block malicious PSD files

🔍 How to Verify

Check if Vulnerable:

Check FreeImage version: ldd /path/to/application | grep freeimage and verify version is 3.19.0 r1859

Check Version:

strings /usr/lib/libfreeimage.so.3 | grep 'FreeImage Version' || freeimage-config --version

Verify Fix Applied:

Verify FreeImage version is updated and test with known safe PSD files to ensure functionality

📡 Detection & Monitoring

Log Indicators:

  • Application crashes when processing PSD files
  • Memory access violation errors in application logs
  • Unexpected process termination

Network Indicators:

  • Unusual outbound connections from image processing services
  • Large PSD file uploads followed by abnormal behavior

SIEM Query:

source="application.log" AND ("segmentation fault" OR "access violation" OR "buffer overflow") AND "psd"

🔗 References

📤 Share & Export