CVE-2021-26825

7.8 HIGH

📋 TL;DR

CVE-2021-26825 is an integer overflow vulnerability in Godot Engine that allows attackers to trigger a stack buffer overflow by loading specially crafted TGA image files. This can lead to arbitrary code execution or application crashes. Users of Godot Engine up to version 3.2 are affected.

💻 Affected Systems

Products:
  • Godot Engine
Versions: All versions up to and including 3.2
Operating Systems: Windows, Linux, macOS, Other platforms supported by Godot
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using Godot Engine to load TGA image files is vulnerable. This includes games, tools, and other software built with Godot.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with attacker gaining full control of the system running the vulnerable Godot application.

🟠

Likely Case

Application crash leading to denial of service, with potential for code execution in specific configurations.

🟢

If Mitigated

Application crash without code execution if memory protections like ASLR are effective.

🌐 Internet-Facing: HIGH - Attackers can exploit remotely by providing malicious TGA files through network protocols or web interfaces.
🏢 Internal Only: MEDIUM - Local users could exploit by loading malicious files, but requires user interaction or specific application functionality.

🎯 Exploit Status

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

The vulnerability is in a core image loading function and exploitation details are publicly available in the patch references.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Godot 3.2.4 and later, 3.3 and later

Vendor Advisory: https://github.com/godotengine/godot/pull/45702

Restart Required: Yes

Instructions:

1. Update Godot Engine to version 3.2.4 or later. 2. Rebuild any applications using Godot with the updated engine. 3. Redeploy updated applications to production environments.

🔧 Temporary Workarounds

Disable TGA image loading

all

Modify Godot applications to disable loading of TGA image files by removing TGA support or implementing file type validation.

Implement input validation

all

Add validation to reject TGA files with suspicious dimensions before passing to the vulnerable function.

🧯 If You Can't Patch

  • Implement network segmentation to isolate vulnerable systems from untrusted networks.
  • Deploy application allowlisting to prevent execution of unauthorized Godot applications.

🔍 How to Verify

Check if Vulnerable:

Check Godot version: if version is 3.2.3 or earlier, the system is vulnerable. Also check if applications load TGA files.

Check Version:

godot --version (command line) or check About dialog in editor

Verify Fix Applied:

Verify Godot version is 3.2.4 or later, or 3.3 or later. Test loading TGA files to ensure no crashes occur.

📡 Detection & Monitoring

Log Indicators:

  • Application crashes when loading image files
  • Memory access violation errors related to image loading

Network Indicators:

  • Unusual network requests for TGA files
  • Traffic patterns suggesting file upload exploitation

SIEM Query:

source="application_logs" AND ("segmentation fault" OR "access violation") AND process="godot"

🔗 References

📤 Share & Export