/

CVE-2026-35389

Severity:

HIGH RISK

(7.5)

Improper Certificate Validation in Bulwark Webmail S/MIME

CVE-2026-35389

Analyzed

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

Authentication Bypass / Message Integrity Spoofing

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

Bulwark Webmail's S/MIME signature verification failed to validate the certificate trust chain, treating signatures from self-signed or otherwise untrusted certificates as valid.

In environments that rely on S/MIME to authenticate senders or protect against spoofing, this flaw can mislead users into trusting forged or unverified emails, undermining email integrity and security decisions.

Affected context

The vulnerability affects Bulwark Webmail deployments that use S/MIME to verify digitally signed emails.

It occurs when the application verifies S/MIME signatures but does not validate the full certificate trust chain (i.e., accepts certificates without confirming they chain to a trusted root).

In such setups, any presented S/MIME signature—whether from a trusted CA, an untrusted CA, or a self-signed certificate—may be shown as "valid," giving users a false sense of authenticity.

Exploit preconditions

  • Attack surface: Email messages processed and displayed by Bulwark Webmail.
  • Required access: Ability to send S/MIME-signed email to a user of the vulnerable webmail instance (no mailbox compromise required).
  • Trigger point: The victim opens or views an S/MIME-signed message in Bulwark Webmail, which then performs signature verification.
  • Why exploitation is possible: The S/MIME verification logic does not enforce certificate chain validation (checkChain: false), so signatures backed by self-signed or untrusted certificates are treated as valid and displayed as such to the user.

Why this happens

The root cause is an improper certificate validation implementation in the S/MIME verification flow, aligning with CWE-295.

Instead of fully validating that the signer's certificate chains up to a trusted root CA (and optionally checking revocation and key usage), the code path effectively skips chain validation.

This insecure pattern reduces signature checks to a purely cryptographic operation (i.e., "was this content signed with this key?") without answering the more important identity question ("is this signer certificate actually trusted?"), enabling untrusted certificates to appear legitimate.

Potential impact

  • Attackers could sign phishing or spoofed emails with self-signed certificates that appear to users as having a valid S/MIME signature.
  • Users may trust forged messages as if they came from internal staff, executives, or trusted partners, enabling targeted phishing or business email compromise.
  • Security policies or workflows that depend on the "signed and valid" status of messages can be bypassed or manipulated.
  • Audit trails that rely on signature validity may be contaminated with messages that only appear authenticated.

General mitigation guidance

Effective mitigation focuses on enforcing strict certificate trust evaluation within S/MIME processing:

  • Ensure S/MIME verification performs full certificate path validation, requiring the signer's certificate to chain to a trusted root CA or explicitly configured trust store.
  • Configure a curated trust store with only vetted root and intermediate CAs appropriate for the deployment context, avoiding implicit trust of arbitrary issuers.
  • Apply additional checks such as certificate expiration, revocation status (CRL/OCSP where feasible), key usage, and extended key usage appropriate for email signing.
  • Present clear and distinct UI indicators differentiating "trusted," "untrusted," and "unsigned" messages so users can make informed decisions.
  • Favor secure-by-default settings that do not allow disabling chain validation in production environments or that require explicit, auditable configuration changes for any relaxation.

How teams detect issues like this

Organizations can detect and monitor for similar issues using:

  • Code review and static analysis: Look for certificate or S/MIME verification calls where chain validation, hostname/identity checks, or trust store configuration are disabled or set to permissive modes (e.g., flags like checkChain: false, "insecureSkipVerify", or equivalent).
  • Security unit/integration tests: Add tests that feed S/MIME-signed messages using self-signed or explicitly untrusted certificates and assert that the UI and verification logic treat them as untrusted or invalid.
  • Configuration and policy audits: Periodically review mail and crypto-related configuration to ensure trust stores, CA bundles, and verification flags align with organizational security policy.
  • Runtime monitoring: Where possible, log certificate validation outcomes and monitor for unusual patterns, such as frequent acceptance of self-signed certificates or sudden spikes in "trusted" signatures from previously unseen issuers.

Sources

SourceLink
github.comgithub.com/bulwarkmail/webmail/security/advisories/GHSA-v6w6-338p-p256

Frequently asked

questions

Yes. An attacker only needs to send a specially prepared S/MIME-signed email to a user of the vulnerable Bulwark Webmail instance. When the user views the message, the signature may appear valid even if the certificate is untrusted.

No. The attacker does not need mailbox or server access; the ability to deliver email to the target mailbox is sufficient. The weakness lies in how the client verifies S/MIME signatures, not in mailbox authorization.

Implement S/MIME and certificate verification using libraries or frameworks that enforce full certificate chain validation by default, and configure them with a well-defined trust store. Avoid disabling chain or identity checks except for strictly controlled development scenarios, and never in production.

Treat cryptographic verification as both a cryptography and an identity problem: always perform full certificate validation (chain, revocation, usage, and identity checks), maintain minimal and well-governed trust stores, and back these controls with automated tests and security reviews that specifically cover S/MIME and TLS certificate handling.

Find out what's already
exploitable in your codebase.