CVE-2018-25011

9.8 CRITICAL

📋 TL;DR

A heap-based buffer overflow vulnerability in libwebp's PutLE16() function allows attackers to execute arbitrary code or cause denial of service. This affects any application that processes WebP images using vulnerable libwebp versions, including web browsers, image editors, and media libraries. The vulnerability is remotely exploitable via specially crafted WebP images.

💻 Affected Systems

Products:
  • libwebp
  • Google Chrome
  • Mozilla Firefox
  • Android
  • iOS
  • macOS
  • Linux distributions with libwebp packages
  • ImageMagick
  • GIMP
  • other applications using libwebp
Versions: libwebp versions before 1.0.1
Operating Systems: Linux, Windows, macOS, Android, iOS
Default Config Vulnerable: ⚠️ Yes
Notes: Any application that uses libwebp to decode WebP images is vulnerable. The vulnerability is in the library itself, not dependent on specific configurations.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the application processing the WebP image, potentially leading to full system compromise.

🟠

Likely Case

Application crash (denial of service) or limited code execution within the application's context.

🟢

If Mitigated

Application crash with no further impact if proper sandboxing or privilege separation is implemented.

🌐 Internet-Facing: HIGH - WebP images are commonly processed by internet-facing applications and services.
🏢 Internal Only: MEDIUM - Internal applications processing WebP images could be exploited via malicious files.

🎯 Exploit Status

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

Proof-of-concept code exists in public bug reports. The vulnerability requires processing a malicious WebP image, which can be delivered via websites, emails, or files.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: libwebp 1.0.1 and later

Vendor Advisory: https://chromium.googlesource.com/webm/libwebp/+/v1.0.1

Restart Required: Yes

Instructions:

1. Update libwebp to version 1.0.1 or later. 2. Update all applications that bundle libwebp (e.g., web browsers, image editors). 3. Restart affected applications and services.

🔧 Temporary Workarounds

Disable WebP image processing

all

Temporarily disable WebP image support in applications if possible

Application-specific configuration changes required

Use system package manager to update

linux

Update libwebp package through system package manager

sudo apt update && sudo apt upgrade libwebp
sudo yum update libwebp
brew upgrade webp

🧯 If You Can't Patch

  • Implement strict input validation for WebP images
  • Run vulnerable applications in sandboxed environments with minimal privileges

🔍 How to Verify

Check if Vulnerable:

Check libwebp version: `libwebp --version` or `dpkg -l | grep libwebp` or `rpm -q libwebp`

Check Version:

libwebp --version

Verify Fix Applied:

Verify libwebp version is 1.0.1 or later: `libwebp --version | grep -q '1\.0\.[1-9]\|1\.[1-9]\|\s[2-9]' && echo 'Patched' || echo 'Vulnerable'`

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation faults or memory corruption errors when processing images
  • Unexpected process termination in image processing services

Network Indicators:

  • Unusual outbound connections from image processing applications
  • Large volumes of WebP image requests to vulnerable services

SIEM Query:

source="application.logs" AND ("segmentation fault" OR "buffer overflow" OR "memory corruption") AND process="*webp*"

🔗 References

📤 Share & Export