CVE-2022-35081
Medium · 5.5CVSS
5.5
EPSS
0.3%
Published
Oct 13, 2022
CISA due date
—
Cloudanix analysis
A flaw in an old image-conversion program can make it crash when someone tries to turn certain picture files into another format, potentially disrupting any automated jobs that rely on it.
- 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
Heap buffer overflow in png_read_header during PNG header processing in png2swf allows out-of-bounds memory access that can crash the process.
Why it matters to the business
Users who convert PNG images to SWF files risk sudden application crashes and loss of work; the tool remains widely referenced in legacy media pipelines with no vendor patch available.
How an attack unfolds
An attacker crafts a malicious PNG file whose header triggers the overflow inside png_read_header. The victim opens the file with png2swf, causing the tool to read beyond allocated heap memory and terminate.
How to fix it
Remove or isolate the png2swf binary; replace any workflow that invokes png2swf with a maintained converter; monitor upstream commits for a corrective patch and rebuild from source once available.
How to confirm the fix worked
Run png2swf against a set of known-good and known-malformed PNG headers in a sandbox and confirm the process exits cleanly without heap diagnostics; verify the binary is no longer present in production paths.
Typical attack path
- Attacker prepares a PNG with a malformed header sized to overflow the buffer in png_read_header.
- Malicious PNG is delivered via email, web download, or shared storage.
- Victim invokes png2swf on the file (directly or via automated script).
- Overflow occurs during header parsing, resulting in process crash.
How to detect it
Search endpoint logs and crash dumps for unexpected terminations of png2swf; correlate with file-access events involving .png files immediately preceding the crash.
What your security team should do
- Inventory all systems and scripts that call png2swf and deprecate them.
- Block execution of the png2swf binary via application allow-listing.
- Add crash-monitoring rules for png2swf in endpoint telemetry.
The record
SWFTools commit 772e55a2 was discovered to contain a heap-buffer overflow via png_read_header at /src/png2swf.c.
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