CVE-2026-48813: Flawfinder Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-4c3c-r6p8-c863
CWE-74
Published
Advisory Summary

CVE-2026-48813 is a HIGH remote code execution vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Flawfinder libraries in the PyPI ecosystem. The issue involves flawfinder output manipulation via untrusted filenames and source text. Remediation is available by upgrading affected packages to version 2.0.20.

CVE-2026-48813 at a Glance

CVE Identifier CVE-2026-48813
GHSA Identifier GHSA-4c3c-r6p8-c863
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Flawfinder
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-48813

To remediate this vulnerability, upgrade all affected Flawfinder dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

flawfinder fixed: 2.0.20
pip install flawfinder>=2.0.20
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show flawfinder

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-48813, inspect your installed packages using pip:

pip show flawfinder

Analyze the terminal output to locate any version of Flawfinder in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.20), your application is affected.

Note: The pip show flawfinder command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Flawfinder, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact This vulnerability is an improper input neutralization issue leading to output manipulation, specifically, Terminal/ANSI Escape Sequence Injection and XML Injection: * Terminal Output Spoofing: A malicious file whose name contains ANSI escape sequences can end up being included in flawfinder's standard terminal output, with many effects. For example, this might allow an attacker to hide critical scan results, falsely making it appear to a human reviewer that no security issues were found. * CSV and XML Injection: Untrusted fields (such as filenames, categories, or code context text) were not properly sanitized when generating structured reports. An attacker could exploit this to corrupt CSV formats or inject arbitrary XML attributes into SonarQube outputs via output_sonar(). It impacts those who use flawfinder to evaluate intentionally malicious filenames or file contents. The initial filename injection problem was reported by Dan Lenz https://www.linkedin.com/in/dan-lenz/ The other vulnerabilities were found by flawfinder project leader David A. Wheeler, GitHub david-a-wheeler, https://dwheeler.com/ ### Patches This issue has been fully patched in Version 2.0.20 (released 2026-05-16). All users should upgrade to version 2.0.20 or later immediately. If you use Python's package manager, you can upgrade using `pip install --upgrade flawfinder`. If you are consuming flawfinder via GitHub Actions, ensure your workflow points to david-a-wheeler/flawfinder@2.0.20 or later. ### Workarounds There is no configuration-based workaround within older versions of flawfinder. If an immediate upgrade is not possible, users can mitigate the risk by: * Pre-scanning filenames: Manually or programmatically verifying that target repositories do not contain filenames with control characters (including ANSI escape sequences) before passing them to flawfinder. * Inspecting raw output: Reviewing flawfinder outputs in a text editor or logging mechanism that explicitly displays or strips raw escape sequences, rather than relying on live terminal rendering. * Restricting untrusted inputs: Avoiding the generation of SonarQube or CSV reports from completely untrusted repositories until the tool is updated. ### Resources See the flawfinder GitHub Repository: https://github.com/david-a-wheeler/flawfinder

CVE-2026-48813 Affected Flawfinder Versions

1 component(s)
Fixed Versions:
2.0.20
Product / Package Ecosystem Affected Versions Fixed Version
flawfinder
PyPI
< 2.0.20
2.0.20

References

Frequently Asked Questions

What is CVE-2026-48813?
CVE-2026-48813 is a security vulnerability in Flawfinder involving Flawfinder output manipulation via untrusted filenames and source text under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Flawfinder versions are affected?
Affected versions include releases prior to 2.0.20 across affected packages: flawfinder.
What version fixes CVE-2026-48813?
Upgrading to 2.0.20 (or the latest patched release for your respective branch) resolves the vulnerability.
Is flawfinder affected?
Yes, flawfinder is affected in releases prior to 2.0.20. Upgrade your dependency to 2.0.20 or later.
What CWE is associated with CVE-2026-48813?
CVE-2026-48813 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2026-48813?
Run the dependency tree command: 'pip show flawfinder'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4c3c-r6p8-c863",
  "modified" : "2026-08-11T19:22:01Z",
  "published" : "2026-06-26T20:52:25Z",
  "aliases" : [ "CVE-2026-48813" ],
  "summary" : "Flawfinder output manipulation via untrusted filenames and source text",
  "details" : "### Impact\n\nThis vulnerability is an improper input neutralization issue leading to output manipulation, specifically, Terminal/ANSI Escape Sequence Injection and XML Injection:\n\n* Terminal Output Spoofing: A malicious file whose name contains ANSI escape sequences can end up being included in flawfinder's standard terminal output, with many effects. For example, this might allow an attacker to hide critical scan results, falsely making it appear to a human reviewer that no security issues were found.\n\n* CSV and XML Injection: Untrusted fields (such as filenames, categories, or code context text) were not properly sanitized when generating structured reports. An attacker could exploit this to corrupt CSV formats or inject arbitrary XML attributes into SonarQube outputs via output_sonar().\n\nIt impacts those who use flawfinder to evaluate intentionally malicious filenames or file contents.\n\nThe initial filename injection problem was reported by Dan Lenz https://www.linkedin.com/in/dan-lenz/\n\nThe other vulnerabilities were found by flawfinder project leader David A. Wheeler, GitHub david-a-wheeler, https://dwheeler.com/\n\n### Patches\n\nThis issue has been fully patched in Version 2.0.20 (released 2026-05-16). All users should upgrade to version 2.0.20 or later immediately. If you use Python's package manager, you can upgrade using `pip install --upgrade flawfinder`. If you are consuming flawfinder via GitHub Actions, ensure your workflow points to david-a-wheeler/flawfinder@2.0.20 or later.\n\n### Workarounds\n\nThere is no configuration-based workaround within older versions of flawfinder. If an immediate upgrade is not possible, users can mitigate the risk by:\n\n* Pre-scanning filenames: Manually or programmatically verifying that target repositories do not contain filenames with control characters (including ANSI escape sequences) before passing them to flawfinder.\n\n* Inspecting raw output: Reviewing flawfinder outputs in a text editor or logging mechanism that explicitly displays or strips raw escape sequences, rather than relying on live terminal rendering.\n\n* Restricting untrusted inputs: Avoiding the generation of SonarQube or CSV reports from completely untrusted repositories until the tool is updated.\n\n### Resources\n\nSee the flawfinder GitHub Repository: https://github.com/david-a-wheeler/flawfinder",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "flawfinder"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.20"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/david-a-wheeler/flawfinder/security/advisories/GHSA-4c3c-r6p8-c863"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48813"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/david-a-wheeler/flawfinder"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/flawfinder/PYSEC-2026-2480.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-26T20:52:25Z",
    "nvd_published_at" : null
  }
}