/

CVE-2026-64855

Severity:

HIGH RISK

(8.2)

Improper Certificate Validation (CWE-295) in soapbar

CVE-2026-64855

Deferred

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295, CWE-347

Impact:

Authentication Bypass and Impersonation

Severity:

HIGH RISK

(8.2)

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

In affected soapbar versions, verify_envelope_bsp() verifies a SOAP signature using a certificate supplied inside the message, without establishing that the certificate belongs to a trusted signer. An attacker who can submit a forged envelope with their own certificate may pass verification and impersonate a trusted party if an application treats success as authentication.

Affected context

The issue affects soapbar's BSP envelope verification path in versions before 0.13.0. verify_envelope_bsp() takes its trust anchor from the message's wsse:BinarySecurityToken and checks the embedded certificate's validity dates, but does not validate a CA chain, enforce an issuer or subject allowlist, or pin a trusted certificate. The separate verify_envelope() method, which uses a caller-supplied certificate, is not affected.

Exploit preconditions

  • Attack surface: An application accepts SOAP envelopes and calls verify_envelope_bsp() on them.
  • Required access: The attacker must be able to submit an envelope to a consumer that relies on this verification result.
  • Trigger point: The application processes an envelope containing a signature and an embedded X.509 certificate.
  • Why exploitation is possible: The method verifies the signature against the certificate supplied in the same untrusted message, without confirming that the certificate chains to or matches a trusted identity.

Why this happens

The verification logic conflates proof of signature validity with proof of signer identity. Because the message itself supplies the certificate used as the trust anchor, an attacker can provide a certificate they control and a signature that verifies against it. This is improper certificate validation (CWE-295) and can also undermine cryptographic signature verification assurances (CWE-347) when applications treat the result as authentication.

Potential impact

  • An attacker may impersonate a trusted SOAP message sender.
  • Applications could accept forged messages as authenticated.
  • Unauthorized actions or data changes may occur if downstream systems trust the verified message.

General mitigation guidance

Defensive patterns should keep trust decisions independent of certificates supplied by the message:

  • Validate certificate chains against explicitly configured trust stores.
  • Enforce expected signer identities through certificate pinning or issuer/subject policy where appropriate.
  • Use verification APIs that require a trusted certificate or trust configuration rather than deriving trust from message content.
  • Treat signature validity and signer authorization as separate checks.
  • Limit the privileges and sensitive operations available to SOAP message handlers.
  • Avoid treating an embedded certificate or a successful cryptographic check alone as proof of identity.

How teams detect issues like this

  • Use static analysis or dependency review to identify signature verification paths that use certificates extracted from untrusted messages as trust anchors.
  • Review code for missing chain validation, identity checks, or certificate pinning after signature verification.
  • Add tests confirming that self-signed or otherwise untrusted embedded certificates are rejected.
  • Enforce policies requiring explicit trust configuration for message-signing verification.
  • Automated code review tools may help flag trust decisions derived from attacker-controlled input.

Sources

SourceLink
github.comgithub.com/hitoshyamamoto/soapbar/pull/71
github.comgithub.com/hitoshyamamoto/soapbar/releases/tag/v0.13.0
github.comgithub.com/hitoshyamamoto/soapbar/security/advisories/GHSA-859w-52fx-hcm6

Frequently asked

questions

It may be exploitable by submitting a SOAP envelope to an application that accepts messages and relies on the affected BSP verification method for authentication.

The attacker needs a way to deliver a crafted envelope to a vulnerable consumer. The issue does not require control of a trusted certificate authority because the method trusts the certificate embedded in the message.

Verify signatures against certificates or trust stores configured independently of the incoming message, and validate both certificate trust and signer identity.

Keep trust anchors out of attacker-controlled input, test rejection of untrusted certificates, and review whether applications distinguish signature validity from authenticated identity.

Find out what's already
exploitable in your codebase.