CVE-2021-39579
High · 7.8CVSS
7.8
EPSS
1.1%
Published
Sep 20, 2021
CISA due date
—
Cloudanix analysis
A problem in an old flash-file tool can let attackers take over a computer when someone opens a specially made file.
- 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 string_hash() allows memory corruption that can lead to arbitrary code execution.
Why it matters to the business
Attackers can gain full control of systems that process untrusted files with the vulnerable tool, risking data theft or ransomware deployment on older unpatched installations.
How an attack unfolds
An attacker supplies a specially crafted input file that triggers the overflow inside string_hash when the tool parses it; public exploit code exists that achieves code execution on vulnerable versions.
How to fix it
No official fixed versions are published; remove swftools from production use, replace with maintained alternatives, or apply source-level patches that eliminate the overflow in q.c.
How to confirm the fix worked
Verify that swftools is no longer present or that custom builds contain bounds checks around string operations in q.c; re-test with known trigger files to confirm absence of crashes or unexpected execution.
Typical attack path
- Obtain or generate a malicious file that overflows the buffer in string_hash
- Deliver the file to a target system running the vulnerable tool
- Victim or automated process opens the file with swftools
- Overflow occurs and attacker-supplied code executes
How to detect it
Search process execution logs and file-access records for invocations of swftools binaries on untrusted inputs; monitor for segmentation faults or abnormal child-process creation during file handling.
What your security team should do
- Immediately inventory all systems for presence of swftools and remove or isolate them
- Block execution of the tool via application allow-listing
- Replace swftools workflows with supported utilities that handle the same file formats
- Add swftools binaries to endpoint monitoring for any future execution attempts
The record
An issue was discovered in swftools through 20200710. A heap-buffer-overflow exists in the function string_hash() located in q.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