LiveActive security incident?Get immediate response
CVE Record

CVE-2021-40401: A use-after-free vulnerability exists in the RS-274X aperture definition tokenization functionality of Gerb...

A use-after-free vulnerability exists in the RS-274X aperture definition tokenization functionality of Gerbv 2.7.0 and dev (commit b5f1eacd) and Gerbv forked 2.7.1. A specially-crafted gerber file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.

CriticalCVSS 10Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

Gerbv can be compromised when it parses a specially crafted PCB Gerber file. The reported impact includes code execution, so vulnerable engineering workstations or automated file-processing systems should be treated as high urgency if they handle untrusted Gerber files.

Executive priority

Prioritize remediation where Gerbv handles external Gerber files. The business risk is compromise of engineering or manufacturing systems through routine file review or processing.

Technical view

CVE-2021-40401 is a use-after-free in Gerbv RS-274X aperture definition tokenization. Sources identify Gerbv 2.7.0, dev commit b5f1eacd, and forked 2.7.1 as affected. A malicious Gerber file can trigger the flaw and potentially execute code.

Likely exposure

Exposure is most likely in electronics design, manufacturing, review, or conversion workflows using vulnerable Gerbv versions to parse Gerber files, especially files received from customers, suppliers, or public sources.

Exploitation context

The source bundle says a specially crafted Gerber file can lead to code execution. CISA KEV is false, and the provided sources do not establish active exploitation in the wild.

Researcher notes

Evidence is strong for affected versions and impact, but the bundle does not provide exploit telemetry. The CWE listed is CWE-252, while the vulnerability description characterizes the bug as use-after-free.

Mitigation direction

  • Inventory Gerbv installations and forked Gerbv builds.
  • Apply relevant Debian or Fedora security updates where applicable.
  • Check Gerbv or distribution guidance for fixed versions.
  • Avoid processing untrusted Gerber files until patched.
  • Isolate any necessary parsing of external Gerber files.

Validation and detection

  • Verify installed Gerbv versions are not listed as affected.
  • Review SBOMs, workstations, CI images, and conversion services for Gerbv.
  • Confirm Debian or Fedora package advisories are applied where relevant.
  • Identify workflows that accept Gerber files from external parties.
  • Document any remaining vulnerable systems and compensating controls.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-252: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-40401 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
10 (3.0)
Known Exploited
No
Published

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
10CVSS 3.0CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:H3.96Primary CVE score

Vulnerability scoring details

Base CVSS 3.0 score

10Critical
CVSS 3.0 vector shape for CVE-2021-40401Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/aGerbvGerbv 2.7.0 ,Gerbv forked 2.7.1 ,Gerbv dev (commit b5f1eacd)Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-252 · source CWE mapping

Unchecked Return Value

Unchecked Return Value represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.