CVE-2021-45972
Linux Debian vulnerability analysis and mitigation

Overview

The giftrans function in giftrans 1.12.2 contains a stack-based buffer overflow vulnerability. The issue exists because a value inside the input file determines the amount of data to write, allowing an attacker to overwrite up to 250 bytes outside of the allocated buffer with arbitrary data. The vulnerability was discovered in December 2021 and assigned identifier CVE-2021-45972 (Debian Bug, NVD).

Technical details

The vulnerability exists in the giftrans function where a buffer overflow can occur due to improper validation of the size value read from the input file. When processing a Graphic Control Extension (0xf9), the code reads a size value from the file and then attempts to write that many bytes into a fixed 5-byte buffer named 'gce'. Since the size value is controlled by the input file content without proper bounds checking, this allows writing beyond the buffer's boundaries (Debian Bug). The vulnerability has been assigned a CVSS v3.1 base score of 7.1 HIGH with vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H (NVD).

Impact

The vulnerability allows an attacker to overwrite up to 250 bytes outside of the allocated buffer with arbitrary data. This buffer overflow could potentially lead to arbitrary code execution or denial of service conditions (NVD).

Mitigation and workarounds

The vulnerability has been fixed in giftrans version 1.12.2-20 by adding a length check to validate the size value before performing the buffer write operation. The patch (32fixsbo_giftrans.diff) was implemented to prevent the buffer overflow condition (Debian Bug).

Additional resources


SourceThis report was generated using AI

Related Linux Debian vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40289N/AN/A
  • Linux DebianLinux Debian
  • linux
NoYesDec 06, 2025
CVE-2025-40288N/AN/A
  • Linux DebianLinux Debian
  • linux
NoYesDec 06, 2025
CVE-2025-40287N/AN/A
  • Linux DebianLinux Debian
  • linux
NoYesDec 06, 2025
CVE-2025-40286N/AN/A
  • Linux DebianLinux Debian
  • linux
NoYesDec 06, 2025
CVE-2025-40285N/AN/A
  • Linux DebianLinux Debian
  • linux
NoYesDec 06, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management