PYSEC-2026-2480
Vulnerability from pysec - Published: 2026-07-13 15:46 - Updated: 2026-07-13 16:04Impact
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
| Name | purl | flawfinder | pkg:pypi/flawfinder |
|---|
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "flawfinder",
"purl": "pkg:pypi/flawfinder"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.0.20"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.0.10",
"2.0.11",
"2.0.14",
"2.0.15",
"2.0.16",
"2.0.17",
"2.0.18",
"2.0.19",
"2.0.3",
"2.0.4",
"2.0.5",
"2.0.6",
"2.0.7",
"2.0.8",
"2.0.9"
]
}
],
"aliases": [
"CVE-2026-48813",
"GHSA-4c3c-r6p8-c863"
],
"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\u0027s 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\u0027s 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",
"id": "PYSEC-2026-2480",
"modified": "2026-07-13T16:04:04.844690Z",
"published": "2026-07-13T15:46:24.919421Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/david-a-wheeler/flawfinder/security/advisories/GHSA-4c3c-r6p8-c863"
},
{
"type": "PACKAGE",
"url": "https://github.com/david-a-wheeler/flawfinder"
},
{
"type": "PACKAGE",
"url": "https://pypi.org/project/flawfinder"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-4c3c-r6p8-c863"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-48813"
}
],
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Flawfinder output manipulation via untrusted filenames and source text"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.