CVE-2025-8736

5.3 MEDIUM

📋 TL;DR

A critical buffer overflow vulnerability exists in GNU cflow's lexer component (yylex function in c.c) affecting versions up to 1.8. This allows local attackers to execute arbitrary code or cause denial of service. The vulnerability requires local access to the system running vulnerable cflow software.

💻 Affected Systems

Products:
  • GNU cflow
Versions: All versions up to and including 1.8
Operating Systems: All operating systems running GNU cflow
Default Config Vulnerable: ⚠️ Yes
Notes: Any system with GNU cflow installed and used is vulnerable. The vulnerability is in the lexer component when processing input files.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation leading to full system compromise, arbitrary code execution as the user running cflow, or complete system crash.

🟠

Likely Case

Denial of service (cflow crashes) or limited code execution within the context of the user running cflow.

🟢

If Mitigated

Minimal impact if proper privilege separation exists and cflow runs with minimal privileges.

🌐 Internet-Facing: LOW - Requires local access, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local users or processes could exploit this, but requires specific conditions (running vulnerable cflow).

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploit has been publicly disclosed according to references. Requires local access and ability to provide malicious input to cflow.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version after 1.8 (check GNU cflow repository for latest)

Vendor Advisory: https://lists.gnu.org/archive/html/bug-cflow/2025-07/msg00001.html

Restart Required: No

Instructions:

1. Check GNU cflow repository for latest version. 2. Download and compile from source. 3. Replace existing cflow binary. 4. Verify installation with version check.

🔧 Temporary Workarounds

Restrict cflow usage

all

Limit cflow execution to trusted users only and avoid processing untrusted input files.

chmod 750 /usr/bin/cflow
setfacl -m u:trusteduser:rx /usr/bin/cflow

Use alternative tools

all

Temporarily use alternative call graph generators until patched.

🧯 If You Can't Patch

  • Run cflow with minimal privileges (non-root user, restricted capabilities)
  • Implement strict input validation for files processed by cflow

🔍 How to Verify

Check if Vulnerable:

Check cflow version: cflow --version. If version is 1.8 or earlier, system is vulnerable.

Check Version:

cflow --version

Verify Fix Applied:

After updating, run cflow --version to confirm version is newer than 1.8. Test with known safe input files.

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault messages from cflow
  • Abnormal termination of cflow processes
  • Core dumps from cflow

Network Indicators:

  • Not applicable - local vulnerability

SIEM Query:

process_name:"cflow" AND (event_type:"segfault" OR exit_code:139)

🔗 References

📤 Share & Export