CVE-2021-42197
High · 7.8CVSS
7.8
EPSS
1.2%
Published
Jun 2, 2022
CISA due date
—
Cloudanix analysis
A flaw in an old tool used to inspect Flash files can let attackers run their own code on a computer simply by getting someone to open a specially made file with that tool.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A memory corruption issue in the swfdump component of swftools allows an attacker-supplied SWF file to trigger arbitrary code execution via improper memory handling during parsing.
Why it matters to the business
Users who process untrusted SWF files with swfdump risk full compromise of their local workstation, enabling malware deployment or data theft with no vendor patch currently available.
How an attack unfolds
An attacker creates a malformed SWF file that exploits the memory corruption path when swfdump parses it; the victim runs swfdump locally on the file, and the flaw leads to code execution. Public exploits are known to exist.
How to fix it
Cease use of swfdump on untrusted input; run the tool only inside a sandbox or virtual machine; monitor the upstream project for any future patches or forks that address the issue.
How to confirm the fix worked
Execute swfdump against known-malicious test files in an isolated environment and confirm absence of crashes or unexpected code paths; review process memory and exit codes for signs of corruption.
Typical attack path
- Craft a malicious SWF file targeting the swfdump parser
- Deliver the file via email, web download, or shared storage
- Victim executes swfdump on the file
- Memory corruption triggers arbitrary code execution
How to detect it
Review command-line audit logs and process creation events for invocations of swfdump on files originating outside trusted sources; correlate with subsequent unexpected child processes or crashes.
What your security team should do
- Block or sandbox execution of swfdump against files from external sources
- Replace swfdump usage with maintained alternatives where possible
- Add swfdump to endpoint allow-listing or application control policies
- Hunt for historical executions of swfdump on untrusted files
The record
An issue was discovered in swftools through 20201222 through a memory leak in the swftools when swfdump is used. It allows an attacker to cause code execution.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:16.04:LTS | swftools | 0 | No fix |
| Ubuntu:18.04:LTS | swftools | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | swftools | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | swftools | 0 | No fix |
Related vulnerabilities
- CVE-2024-28458 Null Pointer Dereference vulnerability in swfdump in swftools 0.9.2 allows attackers to… Also affects swftools
- CVE-2024-26334 swftools v0.9.2 was discovered to contain a segmentation violation via the function… Also affects swftools
- CVE-2024-26337 swftools v0.9.2 was discovered to contain a segmentation violation via the function… Also affects swftools
- CVE-2024-26335 swftools v0.9.2 was discovered to contain a segmentation violation via the function… Also affects swftools
- CVE-2024-26339 swftools v0.9.2 was discovered to contain a strcpy parameter overlap via… Also affects swftools
- CVE-2024-26333 swftools v0.9.2 was discovered to contain a segmentation violation via the function… Also affects swftools
- CVE-2024-25165 A global-buffer-overflow vulnerability was found in SWFTools v0.9.2, in the function… Also affects swftools
- CVE-2024-22956 swftools 0.9.2 was discovered to contain a heap-use-after-free vulnerability via the… Also affects swftools