CVE-2021-39564
High · 7.8CVSS
7.8
EPSS
1.1%
Published
Sep 20, 2021
CISA due date
—
Cloudanix analysis
A bug in an old tool for handling Flash files can let attackers take over a computer when someone processes a specially made file with it.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Memory Corruption
- Remediation
- No Fix Yet
- Effort
- Other
- Patch risk
- Other
What it actually does
Heap buffer overflow in swf_DumpActions allows out-of-bounds write and subsequent arbitrary code execution when a malformed SWF file is processed.
Why it matters to the business
Attackers can gain full control of systems that parse untrusted SWF files with the vulnerable tool, risking malware deployment or data theft; the issue remains unfixed in all published versions and affects any downstream users of the library.
How an attack unfolds
An attacker supplies a crafted SWF file containing oversized action records; when swf_DumpActions parses the file the overflow writes attacker-controlled data onto the heap, enabling control-flow hijacking and code execution in the context of the tool.
How to fix it
No fixed release is available; discontinue use of swftools on untrusted input, isolate the binary in a sandbox or container with no network access, or replace with an alternative SWF processor that receives active maintenance.
How to confirm the fix worked
Rebuild the tool with AddressSanitizer and confirm the overflow is triggered by the same test case; monitor process exit status and heap diagnostics for any remaining users of the binary.
Typical attack path
- Craft malicious SWF with oversized action data
- Deliver file via email, download, or archive
- Victim invokes swftools binary on the file
- Overflow occurs during action dumping
- Attacker payload executes
How to detect it
Look for swftools processes that exit abnormally or produce heap-related error messages when handling SWF input; correlate file-access logs with subsequent suspicious child processes or network connections.
What your security team should do
- Block execution of swftools binaries on endpoints that handle external files
- Add swftools to application allow-list exceptions only after risk acceptance
- Scan source repositories and build pipelines for references to the vulnerable package
- Prefer modern, maintained alternatives for any remaining Flash/SWF processing needs
The record
An issue was discovered in swftools through 20200710. A heap-buffer-overflow exists in the function swf_DumpActions() located in swfaction.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