CVE-2019-12835

9.8 CRITICAL

📋 TL;DR

CVE-2019-12835 is an out-of-bounds write vulnerability in Leanify's XML processing that allows attackers to write controlled data beyond allocated memory boundaries. This affects users of Leanify 0.4.3 who process untrusted XML files. The vulnerability can lead to arbitrary code execution or application crashes.

💻 Affected Systems

Products:
  • Leanify
Versions: 0.4.3 specifically
Operating Systems: All platforms running Leanify
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability triggers when processing XML files containing characters requiring escaping.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the Leanify process, potentially leading to complete system compromise.

🟠

Likely Case

Application crash (denial of service) or limited memory corruption leading to unpredictable behavior.

🟢

If Mitigated

Minimal impact if proper input validation and memory protections are in place.

🌐 Internet-Facing: MEDIUM - Requires processing attacker-controlled XML files, which is less common for internet-facing services.
🏢 Internal Only: MEDIUM - Internal users could exploit if they can supply malicious XML files to Leanify processes.

🎯 Exploit Status

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

Proof of concept available in GitHub issue. Exploitation requires supplying malicious XML to Leanify.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.4.4 and later

Vendor Advisory: https://github.com/JayXon/Leanify/issues/52

Restart Required: No

Instructions:

1. Download Leanify 0.4.4 or later from GitHub. 2. Replace existing Leanify binary with patched version. 3. No restart required for standalone tool.

🔧 Temporary Workarounds

Disable XML processing

all

Avoid processing XML files with Leanify until patched

# Use alternative tools for XML compression or avoid XML files

Input validation

all

Validate XML files before processing with Leanify

# Use xmlint or similar to validate XML before Leanify processing

🧯 If You Can't Patch

  • Restrict Leanify usage to trusted users only
  • Implement strict file upload controls and sandbox Leanify execution

🔍 How to Verify

Check if Vulnerable:

Check Leanify version: leanify --version. If output shows 0.4.3, system is vulnerable.

Check Version:

leanify --version

Verify Fix Applied:

After updating, run leanify --version and confirm version is 0.4.4 or higher.

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with memory access violations
  • Unexpected termination of Leanify processes

Network Indicators:

  • Unusual file uploads to systems running Leanify

SIEM Query:

process_name:"leanify" AND (event_type:"crash" OR exit_code:139)

🔗 References

📤 Share & Export