Moderate: gcc security update

cpp Updated 02 Oct 2025

Summary

10/11/2021
N/A
Yes i
Unrated
Not published

ALSA-2021:4587: Moderate: gcc security update. Affects cpp versions < 8.5.0-4.el8_5.alma. Fixed in 8.5.0-4.el8_5.alma. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The gcc packages provide compilers for C, C++, Java, Fortran, Objective C, and Ada 95 GNU, as well as related support libraries.

Vulnerability Detail

The gcc package is vulnerable to a security issue related to Unicode's bidirectional (BiDi) override characters. This vulnerability, identified as CVE-2021-42574, can lead to trojan source attacks. The issue arises from the improper handling of bidirectional characters, which can be exploited to execute malicious code or manipulate the behavior of the compiler.

How To Fix

Minimum fixed version

8.5.0-4.el8_5.alma

This is the first release that contains the fix.

sudo dnf update cpp

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability.

Conclusion

The gcc package is vulnerable to a security issue related to bidirectional characters. To mitigate this vulnerability, it is recommended to update the gcc package to the fixed version and enable the new warning option. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for cpp →

Share this vulnerability

FAQ

This vulnerability can be exploited to execute malicious code or manipulate the behavior of the gcc compiler.

You can use Vulert's playground (https://vulert.com/scanner) to check if your gcc package is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will analyze it in real-time.

The recommended mitigation is to update the gcc package to the fixed version and enable the new warning option (-Wbidirectional) to detect and warn about potentially dangerous bidirectional characters.

The CVSS score for this vulnerability is not mentioned in the provided information.

You can refer to the CVE page for CVE-2021-42574 for more details about this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for cpp.

How To Fix

Minimum fixed version

8.5.0-4.el8_5.alma

This is the first release that contains the fix.

sudo dnf update cpp

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback