CVE-2021-39598
Medium · 5.5CVSS
5.5
EPSS
0.7%
Published
Sep 20, 2021
CISA due date
—
Cloudanix analysis
A bug in an older Flash-file tool lets attackers crash the program simply by giving it a specially made file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A NULL pointer dereference in the callcode() function in code.c allows crafted input to trigger an immediate crash of the affected process.
Why it matters to the business
Processing of untrusted SWF files can be interrupted at will, causing downtime for any workflow or service that depends on swftools for conversion or analysis.
How an attack unfolds
An attacker supplies a specially crafted SWF file to any swftools binary that invokes callcode(); the function dereferences a NULL pointer and the process terminates, producing a denial-of-service condition.
How to fix it
No fixed versions are published. Remove or isolate swftools from any workflow that accepts untrusted input; replace with maintained alternatives and enforce strict file-type allow-listing.
How to confirm the fix worked
Run the affected binaries against known crashing SWF samples in a controlled environment and confirm that the process terminates with a segmentation fault or equivalent NULL-dereference signal; verify that no newer upstream release resolves the issue.
Typical attack path
- Obtain or generate a malicious SWF file that reaches the vulnerable code path
- Invoke a swftools utility (e.g., swfextract, swfrender) on the file
- callcode() executes and dereferences a NULL pointer
- Process crashes, resulting in denial of service
How to detect it
Inspect process crash dumps, syslog entries, and any custom logging that records the call stack when swftools utilities terminate abnormally; look for references to code.c or the callcode symbol.
What your security team should do
- Inventory all systems and containers that ship or execute swftools
- Block or sandbox any use of the tools on untrusted files
- Monitor crash-reporting pipelines for repeated callcode NULL dereference signatures
- Plan migration to supported SWF or vector-graphics tooling
The record
An issue was discovered in swftools through 20200710. A NULL pointer dereference exists in the function callcode() located in code.c. It allows an attacker to cause Denial of Service.
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