CVE-2021-40394
NixOS vulnerability analysis and mitigation

Overview

An integer overflow vulnerability exists in the RS-274X aperture macro outline primitive functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and the forked version of Gerbv (commit 71493260). The vulnerability was discovered in December 2021 and affects the Gerbv software, which is used to view and convert Gerber files for printed circuit board (PCB) manufacturing (Talos Intelligence).

Technical details

The vulnerability occurs in the RS-274X aperture macro outline primitive handling where an integer overflow can be triggered through a specially-crafted gerber file. The issue arises when calculating the number of parameters for the primitive, where nufparameters = ((int)s->stack[1] + 1) * 2 + 3 can overflow, leading to a bypass of size checks and subsequent out-of-bounds memory write. The vulnerability has been assigned a CVSS v3 score of 10.0 (Critical) with vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H ([Talos Intelligence](https://talosintelligence.com/vulnerabilityreports/TALOS-2021-1405)).

Impact

A successful exploitation of this vulnerability can lead to code execution on the target system. This is particularly concerning as some PCB manufacturers use Gerbv in their web interfaces to convert Gerber files into images, making the vulnerability accessible via network without user interaction or privilege requirements (Talos Intelligence).

Mitigation and workarounds

The vulnerability has been patched in various distributions including Debian 10 (buster) with version 2.7.0-1+deb10u3, Debian 11 (bullseye) with version 2.7.0-2+deb11u2, and Ubuntu versions 22.04 LTS (jammy), 20.04 LTS (focal), 18.04 LTS (bionic), and 16.04 LTS (xenial) (Debian Security, Ubuntu Security).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-48606HIGH7.8
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48625HIGH7
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48608MEDIUM5.5
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48569MEDIUM5.5
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-65799MEDIUM4.3
  • NixOSNixOS
  • memos
NoYesDec 08, 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