CVE-2026-48813: Flawfinder Remote Code Execution Vulnerability
HIGHCVE-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
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.
pip install flawfinder>=2.0.20
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
CVE-2026-48813 Affected Flawfinder Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
flawfinder
|
PyPI |
< 2.0.20
|
2.0.20
|
References
Frequently Asked Questions
What is CVE-2026-48813?
Which Flawfinder versions are affected?
What version fixes CVE-2026-48813?
Is flawfinder affected?
What CWE is associated with CVE-2026-48813?
How can I check PyPI dependencies for CVE-2026-48813?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}