CVE-2025-4575 Overview
CVE-2025-4575 is a Certificate Validation Bypass vulnerability affecting OpenSSL 3.5, specifically the openssl x509 command-line application. A copy and paste error during code refactoring causes the -addreject option to incorrectly add a trusted use instead of a rejected use for a certificate. This logic inversion means that when administrators attempt to explicitly reject a certificate for specific purposes, it is instead marked as trusted for those purposes.
Critical Impact
When users intend to make a trusted certificate rejected for a particular use, it will instead be marked as trusted for that use, potentially allowing unintended certificate trust relationships.
Affected Products
- OpenSSL 3.5.0
- openssl x509 command-line application
- Trusted certificate format users utilizing the -addreject option
Discovery Timeline
- May 22, 2025 - CVE-2025-4575 published to NVD
- October 23, 2025 - Last updated in NVD database
Technical Details for CVE-2025-4575
Vulnerability Analysis
This vulnerability stems from an Improper Certificate Validation issue (CWE-295) introduced during minor code refactoring in OpenSSL 3.5. The flaw specifically affects the -addreject option in the openssl x509 command-line utility. When a user attempts to mark a certificate as rejected for a particular use case (such as CMS signature verification), the certificate is instead added to the trust list rather than the rejection list.
For example, if an administrator has a trusted CA certificate that should only authenticate TLS servers but wants to explicitly reject it for CMS signature verification purposes, using the -addreject option will result in the CA certificate being trusted for CMS signature verification instead of being rejected. This directly contradicts the administrator's security intent and could allow certificates to be used in ways that were explicitly meant to be prohibited.
The vulnerability only affects users who work with the trusted certificate format and specifically use the openssl x509 command-line application to add rejected uses. The FIPS modules across all supported versions (3.5, 3.4, 3.3, 3.2, 3.1, and 3.0) are not affected. Additionally, OpenSSL versions 3.4, 3.3, 3.2, 3.1, 3.0, 1.1.1, and 1.0.2 are not affected by this issue.
Root Cause
The root cause is a simple copy and paste error introduced during code refactoring. In the apps/x509.c file, when processing the -addreject option, the code incorrectly pushes the ASN1 object to the trust stack instead of the reject stack. This single-line error inverts the intended behavior of the -addreject option.
Attack Vector
The attack vector is network-based, though exploitation requires specific conditions. An attacker cannot directly exploit this vulnerability remotely. Instead, the vulnerability manifests when system administrators or security teams inadvertently misconfigure certificate trust due to the buggy -addreject option behavior. The resulting misconfigured trust relationships could then be leveraged in subsequent attacks where certificates are trusted for purposes they should have been explicitly rejected for, such as improper signature verification or authentication scenarios.
// Patch showing the fix in apps/x509.c
// The -addreject option was incorrectly pushing to trust instead of reject
prog, opt_arg());
goto opthelp;
}
- if (!sk_ASN1_OBJECT_push(trust, objtmp))
+ if (!sk_ASN1_OBJECT_push(reject, objtmp))
goto end;
trustout = 1;
break;
Source: GitHub OpenSSL Commit
Detection Methods for CVE-2025-4575
Indicators of Compromise
- Certificates that should be rejected for specific uses appearing in trust lists
- Unexpected certificate trust relationships in systems where -addreject was used
- CMS signature verification succeeding for certificates that were intended to be rejected
Detection Strategies
- Audit all certificates processed with the openssl x509 -addreject option on OpenSSL 3.5.0 systems
- Review certificate trust stores for any entries that were expected to be in rejection lists
- Compare current certificate trust configurations against documented security policies and intended configurations
Monitoring Recommendations
- Monitor for usage of openssl x509 -addreject command in system logs and administrative scripts
- Implement certificate trust validation checks as part of security auditing procedures
- Review any automated certificate management scripts that may use the affected -addreject option
How to Mitigate CVE-2025-4575
Immediate Actions Required
- Identify all systems running OpenSSL version 3.5.0
- Audit any certificates that were processed using the -addreject option
- Re-process affected certificates after applying the security patch to correct trust relationships
- Review and revalidate certificate trust configurations on affected systems
Patch Information
OpenSSL has released a security patch to address this vulnerability. The fix corrects the logic error by properly pushing ASN1 objects to the reject stack instead of the trust stack when the -addreject option is used. The patch is available via commit e96d22446e633d117e6c9904cb15b4693e956eaa. Administrators should update to the patched version and then re-run any -addreject operations that were performed with the vulnerable version. For detailed patch information, refer to the OpenSSL Security Advisory and the GitHub commit.
Workarounds
- Avoid using the -addreject option on OpenSSL 3.5.0 until the patch is applied
- Use alternative certificate management methods or older unaffected OpenSSL versions (3.4, 3.3, 3.2, 3.1, 3.0) for reject operations
- Manually verify certificate trust configurations after any -addreject operations
- Consider downgrading to OpenSSL 3.4 or earlier for certificate trust management tasks until the patch can be deployed
# Verify your OpenSSL version
openssl version
# If running 3.5.0, check for certificates processed with -addreject
# Review certificate trust settings after patching
openssl x509 -in certificate.pem -trustout -text | grep -A5 "Trusted Uses\|Rejected Uses"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

