Severity:

HIGH RISK

(7.5)

Improper Certificate Validation in AWS-LC PKCS7_verify()

CVE-2026-3336

Modified

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

Authentication Bypass / Signature Trust Bypass

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A certificate validation flaw in AWS-LC's PKCS7_verify() function can cause incomplete or incorrect certificate chain verification when handling PKCS7 objects with multiple signers.

An unauthenticated attacker who can supply or influence PKCS7 data may be able to bypass certificate chain verification for all but the final signer, potentially causing applications to trust signatures that should be rejected.

Affected context

This issue affects applications that:

  • Use the AWS-LC cryptographic library
  • Invoke PKCS7_verify() to validate signed PKCS7/CMS objects
  • Accept or process PKCS7 objects containing multiple signers
  • Rely on PKCS7_verify()'s built-in certificate chain validation to enforce trust

The vulnerability is relevant when applications use PKCS7 signatures for authenticity or integrity checks and do not perform independent certificate validation outside of PKCS7_verify().

Exploit preconditions

  • Attack surface: PKCS7 or CMS signature processing endpoints (e.g., file upload handlers, secure messaging interfaces, signature verification APIs).
  • Required access: Ability to submit or influence PKCS7-signed data consumed by the vulnerable application; no prior authentication may be required if the endpoint is public.
  • Trigger point: Verification of a PKCS7 object that includes multiple signers, where the application relies on PKCS7_verify() to enforce certificate chain validation.
  • Why exploitation is possible: PKCS7_verify() does not correctly enforce chain validation for all signers when multiple signers are present, allowing some signers' certificates to bypass full trust-path checks.

Why this happens

The underlying bug falls under CWE-295: Improper Certificate Validation.

In the affected code path, AWS-LC's PKCS7_verify() implementation does not consistently or correctly validate the certificate chain for each signer in a multi-signer PKCS7 object.

Instead of applying the expected trust-anchor validation and revocation / policy checks uniformly, the function effectively relaxes or omits verification for all but the final signer.

This creates a gap between the application's trust assumptions ("PKCS7_verify() has validated all signers") and the library's actual behavior, leading to acceptance of signatures that should fail validation.

Potential impact

  • Applications may accept signatures from untrusted or improperly validated certificates for non-final signers.
  • Attackers could bypass signature-based authentication that relies on PKCS7_verify() for trust decisions.
  • Integrity checks based on PKCS7/CMS signatures may be weakened, allowing malicious or altered data to appear valid.
  • Security controls that distinguish trusted vs. untrusted content or actors based on PKCS7 signatures may make incorrect trust decisions.

General mitigation guidance

Effective mitigation focuses on strengthening certificate validation paths and reducing trust in library defaults:

  • Ensure that every signer's certificate chain is explicitly validated against a well-defined trust store, especially when processing PKCS7 objects with multiple signers.
  • Use strict verification policies: require a complete, valid chain to a trusted root CA, with appropriate key usage and extended key usage checks.
  • Where feasible, decouple signature verification from certificate validation: treat PKCS7_verify() as a cryptographic primitive and perform certificate and identity validation in higher-level application code.
  • Minimize acceptance of complex multi-signer PKCS7 structures unless there is a clear business need and a defined validation policy for each signer.
  • Apply least-privilege and defense-in-depth: even when signatures validate, gate sensitive actions behind additional authentication or authorization checks so that a single validation flaw does not grant full access.

How teams detect issues like this

Detection typically combines code-level review with behavioral testing:

  • Static analysis / code search: Identify all code paths that call PKCS7_verify() or equivalent APIs in AWS-LC, particularly those that:
  • Accept PKCS7 data from external or untrusted sources
  • Rely solely on the library's default certificate checking without additional validation
  • Code review signals:
  • Logic that assumes "PKCS7_verify() success == signer is fully trusted," with no subsequent certificate checks
  • Handling of multi-signer PKCS7 objects where only the result of a single aggregate verification is used for authorization
  • Dynamic and integration testing:
  • Construct or use test data containing PKCS7 objects with multiple signers, some with intentionally invalid or untrusted certificates, and observe whether the application incorrectly accepts them.
  • Policy enforcement:
  • Introduce secure coding guidelines requiring explicit certificate-chain validation for all signers, and enforce them via CI checks or manual security reviews.

Sources

SourceLink
aws.amazon.comaws.amazon.com/security/security-bulletins/2026-005-AWS/
github.comgithub.com/aws/aws-lc/releases/tag/v1.69.0
github.comgithub.com/aws/aws-lc/security/advisories/GHSA-cfwj-9wp5-wqvp
access.redhat.comaccess.redhat.com/errata/RHSA-2026:5459
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-3336
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2444026
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-3336.json

Frequently asked

questions

It can be, if an application exposes an interface that accepts PKCS7-signed data from remote users and uses PKCS7_verify() for trust decisions. In that case, a remote attacker could craft multi-signer PKCS7 objects to exploit the incomplete certificate validation.

Not necessarily. If the PKCS7 verification endpoint is public (for example, a service that validates signed files, tokens, or messages), an unauthenticated attacker who can send PKCS7 data to the service may attempt exploitation. If PKCS7 data is only accepted from authenticated or internal sources, the attacker would need whatever access is required to reach that path.

The safest pattern is to ensure robust, explicit certificate-chain validation for all signers independent of any single library convenience function. Applications should validate each signer's certificate against a defined trust store, check required certificate policies and usages, and fail closed when validation is incomplete or ambiguous.

Preventative strategies include: treating cryptographic libraries as low-level primitives rather than complete trust solutions; performing independent certificate and identity validation in business logic; writing tests that cover complex structures like multi-signer PKCS7 objects; and adopting secure coding standards that require explicit handling of certificate chains and trust anchors for all cryptographic verification workflows.

Find out what's already
exploitable in your codebase.