Cloudanix VulnDB

CVE-2021-42199

High · 7.8

CVSS

7.8

EPSS

1.2%

Published

Jun 2, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in a program that handles old Flash files can let attackers take over a computer when someone opens a specially made file.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Heap buffer overflow in swf_FontExtract_DefineTextCallback within swftext.c that permits attacker-controlled data to overwrite adjacent heap memory and achieve arbitrary code execution.

Why it matters to the business

Processing a malicious SWF file with the affected tool can result in full system compromise, data theft, or deployment of additional malware on developer or analyst workstations.

How an attack unfolds

An attacker creates a crafted SWF containing oversized or malformed text records, convinces a victim to run an swftools command such as swfextract or font extraction against the file, and the overflow is triggered during DefineText callback processing to redirect execution to attacker-supplied shellcode.

How to fix it

Upgrade swftools to the latest available version or a patched fork that resolves the overflow in swftext.c; where no upstream fix exists, replace the tool with an alternative SWF processor and remove swftools from build and analysis pipelines.

How to confirm the fix worked

Confirm swftools version is newer than the 20201222 snapshot; run the affected font-extraction commands against known-bad SWF samples in a sandbox and verify absence of crashes or unexpected memory writes.

Typical attack path

  1. Generate malicious SWF file that triggers the overflow in DefineText handling
  2. Deliver the file via email, download link, or shared repository
  3. Victim executes swftools utility against the file
  4. Heap corruption leads to code execution in the context of the running user

How to detect it

Review process execution logs and crash dumps for swftools utilities; correlate file-access events on .swf files immediately preceding abnormal termination or unexpected child-process creation.

  • swf_FontExtract_DefineTextCallback
  • swftext.c
  • swfextract.*\.swf

What your security team should do

  • Remove or isolate swftools from any workflow that accepts untrusted SWF input
  • Add swftools binaries to application allow-listing only after integrity verification
  • Scan source repositories and CI pipelines for references to the vulnerable swftext.c functions
  • Monitor EPSS and exploit-availability feeds for increases in weaponization

The record

An issue was discovered in swftools through 20201222. A heap buffer overflow exists in the function swf_FontExtract_DefineTextCallback() located in swftext.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