CVE-2021-39577
High · 7.8CVSS
7.8
EPSS
1.1%
Published
Sep 20, 2021
CISA due date
—
Cloudanix analysis
A bug in an old tool that reads Flash files can let attackers take over a computer if someone opens 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
Heap buffer overflow in the main function of swfdump.c allows out-of-bounds memory writes when processing a crafted SWF file, enabling arbitrary code execution in the context of the swfdump process.
Why it matters to the business
Processing untrusted SWF files with the affected tool can lead to full system compromise on developer or analysis workstations, increasing risk of malware deployment or data theft in environments that still rely on legacy Flash tooling.
How an attack unfolds
An attacker supplies a malicious SWF file that triggers the heap overflow during parsing in swfdump; when a user or automated process invokes swfdump on the file, the overflow is used to overwrite memory and redirect execution to attacker-controlled code.
How to fix it
Remove or isolate swftools installations; if continued use is required, rebuild from source after applying any upstream memory-safety patches and restrict execution to trusted inputs only. No official fixed versions have been published.
How to confirm the fix worked
Confirm swftools version is newer than 20200710 or that the binary has been rebuilt with the overflow fixed; test against publicly available proof-of-concept SWF files that previously triggered the crash.
Typical attack path
- Create a specially crafted SWF file that triggers the heap overflow in swfdump.c
- Deliver the file via email, web download, or shared storage to a target system
- Convince the victim or an automated workflow to run swfdump against the file
- Achieve arbitrary code execution within the swfdump process
How to detect it
Search process execution logs and file-access telemetry for swfdump invocations against files originating outside trusted sources; monitor for segmentation faults or abnormal memory usage during SWF processing.
- swfdump
- swfdump.c
- heap-buffer-overflow
What your security team should do
- Immediately restrict or block execution of swfdump on any untrusted input
- Inventory all systems still shipping or using swftools and schedule removal
- Replace legacy SWF analysis workflows with maintained, memory-safe alternatives
- Add swfdump to application allow-listing or sandbox policies where removal is not feasible
The record
An issue was discovered in swftools through 20200710. A heap-buffer-overflow exists in the function main() located in swfdump.c. 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