CVE-2021-39582
High · 7.8CVSS
7.8
EPSS
1.1%
Published
Sep 20, 2021
CISA due date
—
Cloudanix analysis
A problem in an old tool used to handle Flash files can let attackers take over a computer simply by getting someone to open a specially made file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- Application
- Class
- Memory Corruption
- Remediation
- No Fix Yet
- Effort
- High
- Patch risk
- Other
What it actually does
Heap buffer overflow in swf_GetPlaceObject within swfobject.c allows out-of-bounds write and subsequent arbitrary code execution when processing a crafted SWF file.
Why it matters to the business
Attackers can gain full control of systems that use this unmaintained tool to inspect or convert SWF files, leading to potential data theft, ransomware deployment, or lateral movement; the project has released no patches since 2020 and remains widely present in legacy media workflows.
How an attack unfolds
An attacker creates a malicious SWF file that triggers the overflow when parsed by swf_GetPlaceObject. The victim opens the file using any swftools utility; the overflow overwrites heap memory to redirect execution to attacker-controlled code, achieving local code execution on the victim's machine.
How to fix it
Immediately replace swftools with a maintained alternative for SWF processing; if continued use is unavoidable, compile from source with hardened memory allocators and strict sandboxing, or remove the affected binary from all systems.
How to confirm the fix worked
Confirm the installed swftools version is newer than 20200710 or that the binary has been rebuilt with the upstream buffer-size checks; test by feeding known-good and known-malicious SWF samples and verifying absence of crashes or unexpected exits.
Typical attack path
- Craft a specially malformed SWF file that overflows the heap buffer in swf_GetPlaceObject
- Deliver the file via email, download link, or shared storage to a target user or automated processing pipeline
- Victim or script invokes an swftools binary on the file
- Overflow occurs, shellcode or ROP chain executes, establishing attacker control
How to detect it
Search process-creation and file-access logs for invocations of swftools utilities on externally sourced SWF files; monitor for segmentation faults or heap-related crashes in those processes.
What your security team should do
- Inventory all systems and build pipelines that still ship or invoke swftools and schedule removal within 30 days
- Block execution of swftools binaries via application allow-listing until replacement is complete
- Add SWF file ingestion to the list of high-risk file types monitored by EDR and sandbox solutions
The record
An issue was discovered in swftools through 20200710. A heap-buffer-overflow exists in the function swf_GetPlaceObject() located in swfobject.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