---
id: CVE-2021-46195
title: >-
  GCC v12.0 was discovered to contain an uncontrolled recursion via the
  component libiberty/rust-demangle.c
summary: >-
  GCC v12.0 was discovered to contain an uncontrolled recursion via the
  component libiberty/rust-demangle.c. This vulnerability allows attackers to
  cause a Denial of Service (DoS) by consuming excessive CPU and memory
  resources.
severity: medium
cvss: 5.5
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'
cwe:
  - CWE-674
vendor: gnu
product: gcc
affected:
  - gcc = 12.0
published: '2022-01-14'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T22:17:14.157'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2021-46195'
references:
  - url: 'https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103841'
    label: cve@mitre.org
  - url: 'https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103841'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.00779
epssPercentile: 0.54517
ingestedAt: '2026-10-08T23:16:47.329Z'
---

## Overview

GCC v12.0 was discovered to contain an uncontrolled recursion via the component libiberty/rust-demangle.c. This vulnerability allows attackers to cause a Denial of Service (DoS) by consuming excessive CPU and memory resources.

## Affected

- `gcc = 12.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
