cve.bz

CVE-2021-20230 stunnel stunnel: Improper Certificate Validation

7.5 highEPSS 1.2%Fix available

High (7.5) in stunnel stunnel. EPSS 1.2% estimated probability of exploitation activity in the next 30 days.

On this page
A flaw was found in stunnel before 5.57, where it improperly validates client certificates when it is configured to use both redirect and verifyChain options. This flaw allows an attacker with a certificate signed by a Certificate Authority, which is not the one accepted by the stunnel server, to access the tunneled service instead of being redirected to the address specified in the redirect option. The highest threat from this vulnerability is to confidentiality.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
1.2% (unchanged from 1.2% a week ago; 1.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 69th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-295 Improper Certificate Validation
OWASP Top 10
A07:2025 Authentication Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-20230 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-20230?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-20230?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-20230 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
stunnel:stunnelbefore 5.57

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13stunnel43:5.56+dfsg-8DEBIAN-CVE-2021-20230
Ubuntu20.04:LTSstunnel43:5.56-1ubuntu0.2UBUNTU-CVE-2021-20230 USN-6901-1
UbuntuPro:18.04:LTSstunnel43:5.44-1ubuntu3+esm1UBUNTU-CVE-2021-20230 USN-6901-1
Red Hatenterprise_linux:8::baseosstunnel, stunnel-debuginfo, stunnel-debugsource0:5.56-5.el8_3RHSA-2021:0618
Red Hatrhel_eus:8.1::baseosstunnel, stunnel-debuginfo, stunnel-debugsource0:5.48-6.el8_1RHSA-2021:0620
Red Hatrhel_eus:8.2::baseosstunnel, stunnel-debuginfo, stunnel-debugsource0:5.48-6.el8_2RHSA-2021:0619
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 10 morestunnel5.44-3.8.1SUSE-SU-2021:1465-1
SUSELinux Enterprise Module for Server Applications 15 SP2stunnel5.57-3.11.1SUSE-SU-2021:0772-1
openSUSELeap 15.2stunnel5.57-lp152.2.6.1openSUSE-SU-2021:0409-1
AlmaLinux8stunnel5.56-5.el8_3ALSA-2021:0618
Rocky Linux8stunnel0:5.56-5.el8_3RLSA-2021:0618
Azure Linux2stunnel5.70-1AZL-7375

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This issue did not affect the versions of stunnel as shipped with Red Hat Enterprise Linux 5, 6, and 7 as they did not include support for the "redirect" option.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8stunnel-0:5.56-5.el8_3Fixed 2021-02-22RHSA-2021:0618
Red Hat Enterprise Linux 8.1 Extended Update Supportstunnel-0:5.48-6.el8_1Fixed 2021-02-22RHSA-2021:0620
Red Hat Enterprise Linux 8.2 Extended Update Supportstunnel-0:5.48-6.el8_2Fixed 2021-02-22RHSA-2021:0619
Red Hat Enterprise Linux 5stunnelNot affected
Red Hat Enterprise Linux 6stunnelNot affected
Red Hat Enterprise Linux 7stunnelNot affected
Red Hat Enterprise Linux 9stunnelNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-20230.

Attack patterns (CAPEC)

  • CAPEC-459 Creating a Rogue Certification Authority Certificate Likelihood: Medium · Severity: Very High
  • CAPEC-475 Signature Spoofing by Improper Validation Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON