CVE-2019-17362

9.1 CRITICAL

📋 TL;DR

CVE-2019-17362 is a buffer overflow vulnerability in LibTomCrypt's UTF-8 DER decoding function that allows attackers to cause denial of service or read sensitive memory contents. Any application using LibTomCrypt versions through 1.18.2 to process DER-encoded data is potentially affected. This vulnerability can be triggered by specially crafted DER-encoded UTF-8 strings.

💻 Affected Systems

Products:
  • LibTomCrypt
  • Applications using LibTomCrypt library
Versions: All versions through 1.18.2
Operating Systems: All operating systems using vulnerable LibTomCrypt versions
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability is triggered when processing DER-encoded UTF-8 strings. Applications must use the der_decode_utf8_string function to be vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, though this would require additional memory corruption exploitation techniques beyond the initial out-of-bounds read.

🟠

Likely Case

Denial of service through application crashes and potential information disclosure via memory content leakage.

🟢

If Mitigated

Limited impact with proper input validation and memory protection mechanisms in place, potentially preventing successful exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires sending specially crafted DER-encoded data to applications using the vulnerable function. The vulnerability is well-documented with public proof-of-concept available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.18.3 and later

Vendor Advisory: https://github.com/libtom/libtomcrypt/issues/507

Restart Required: Yes

Instructions:

1. Update LibTomCrypt to version 1.18.3 or later. 2. Recompile and redeploy any applications using LibTomCrypt. 3. Restart affected services.

🔧 Temporary Workarounds

Input Validation

all

Implement strict input validation for DER-encoded data before passing to LibTomCrypt functions

Memory Protection

linux

Enable ASLR and other memory protection mechanisms to reduce exploit impact

echo 2 > /proc/sys/kernel/randomize_va_space

🧯 If You Can't Patch

  • Implement network filtering to block or inspect DER-encoded data
  • Isolate vulnerable systems from untrusted networks and users

🔍 How to Verify

Check if Vulnerable:

Check LibTomCrypt version: ldd on binary or check library version. If version <= 1.18.2 and application uses der_decode_utf8_string, it's vulnerable.

Check Version:

strings /path/to/libtomcrypt.so | grep -i version

Verify Fix Applied:

Verify LibTomCrypt version is >= 1.18.3 and test with known malicious DER-encoded UTF-8 strings

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation faults
  • Memory access violation errors
  • Unexpected termination of services using LibTomCrypt

Network Indicators:

  • Unusual DER-encoded data patterns in network traffic
  • Multiple connection attempts with malformed data

SIEM Query:

source="application_logs" AND ("segmentation fault" OR "memory violation" OR "libtomcrypt")

🔗 References

📤 Share & Export