/

CVE-2026-109399

Severity:

HIGH RISK

(8.1)

Improper Certificate Validation (CWE-295) in SWUpdate

CVE-2026-109399

Deferred

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

Unauthorized Firmware Installation

Severity:

HIGH RISK

(8.1)

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

SWUpdate may improperly validate X.509 certificate chains when processing CMS-signed update packages. An attacker with a signing key issued by a sibling intermediate under the same trusted root may embed that intermediate certificate and cause a malicious update to be accepted.

SWUpdate may improperly validate X.509 certificate chains when processing CMS-signed update packages. An attacker with a signing key issued by a sibling intermediate under the same trusted root may embed that intermediate certificate and cause a malicious update to be accepted.

Affected context

The issue occurs in SWUpdate deployments that verify CMS SignedData using OpenSSL and rely on certificates supplied within the signed update for certificate-chain building. Risk depends on the trust configuration, the presence of sibling intermediates under a common root, and whether an attacker can obtain or misuse a private signing key recognized by that trust hierarchy.

The issue occurs in SWUpdate deployments that verify CMS SignedData using OpenSSL and rely on certificates supplied within the signed update for certificate-chain building. Risk depends on the trust configuration, the presence of sibling intermediates under a common root, and whether an attacker can obtain or misuse a private signing key recognized by that trust hierarchy.

Exploit preconditions

  • Attack surface: CMS-signed firmware or software update verification
  • Required access: Control of a signing key associated with a sibling intermediate certificate under a trusted root
  • Trigger point: Certificate-chain construction during CMS SignedData verification
  • Why exploitation is possible: Embedded certificates are treated as trusted chain-building material without sufficiently restricting validation to authorized intermediates or expected signer paths
  • Attack surface: CMS-signed firmware or software update verification
  • Required access: Control of a signing key associated with a sibling intermediate certificate under a trusted root
  • Trigger point: Certificate-chain construction during CMS SignedData verification
  • Why exploitation is possible: Embedded certificates are treated as trusted chain-building material without sufficiently restricting validation to authorized intermediates or expected signer paths

Why this happens

The underlying flaw is insufficient certificate-path validation. The verifier accepts untrusted X.509 certificates embedded in CMS SignedData as inputs for building a chain, rather than enforcing a narrowly defined and independently trusted issuer path.

This maps to CWE-295: Improper Certificate Validation, where certificate identity, trust relationships, or authorization constraints are not checked strongly enough before accepting a signed object. Possession of a key from a related but unauthorized branch of the trust hierarchy may therefore be treated as sufficient authority to sign updates.

The underlying flaw is insufficient certificate-path validation. The verifier accepts untrusted X.509 certificates embedded in CMS SignedData as inputs for building a chain, rather than enforcing a narrowly defined and independently trusted issuer path.

This maps to CWE-295: Improper Certificate Validation, where certificate identity, trust relationships, or authorization constraints are not checked strongly enough before accepting a signed object. Possession of a key from a related but unauthorized branch of the trust hierarchy may therefore be treated as sufficient authority to sign updates.

Potential impact

  • An attacker may install malicious firmware or software updates
  • Devices could be persistently compromised
  • Device data or credentials could be exposed or altered
  • Attackers could bypass intended update authorization boundaries
  • Compromised devices could support broader operational or supply-chain attacks
  • An attacker may install malicious firmware or software updates
  • Devices could be persistently compromised
  • Device data or credentials could be exposed or altered
  • Attackers could bypass intended update authorization boundaries
  • Compromised devices could support broader operational or supply-chain attacks

General mitigation guidance

Mitigation generally focuses on making certificate trust and signer authorization explicit rather than relying on certificates supplied by the update.

Common defensive patterns include:

  • Building certificate paths only from explicitly trusted and authorized issuers
  • Separating chain-building inputs from trust anchors and enforcing expected intermediate constraints
  • Pinning permitted signer identities, key identifiers, or certificate policies where operationally appropriate
  • Rejecting unexpected embedded intermediates unless they are independently authorized
  • Protecting signing keys with strong access controls, hardware-backed storage, and separation of duties
  • Applying least privilege to update installation and validating update metadata before deployment

Mitigation generally focuses on making certificate trust and signer authorization explicit rather than relying on certificates supplied by the update.

Common defensive patterns include:

  • Building certificate paths only from explicitly trusted and authorized issuers
  • Separating chain-building inputs from trust anchors and enforcing expected intermediate constraints
  • Pinning permitted signer identities, key identifiers, or certificate policies where operationally appropriate
  • Rejecting unexpected embedded intermediates unless they are independently authorized
  • Protecting signing keys with strong access controls, hardware-backed storage, and separation of duties
  • Applying least privilege to update installation and validating update metadata before deployment

How teams detect issues like this

Organizations can identify similar weaknesses through:

  • Static analysis and code review of CMS, X.509, and certificate-path validation logic
  • Checks for trust decisions based directly on certificates embedded in untrusted messages
  • Tests using sibling intermediates, alternate chain paths, expired certificates, revoked certificates, and policy mismatches
  • Verification that update authorization is bound to an explicitly approved signer rather than only to a common root
  • CI or policy enforcement requiring documented trust anchors and signer constraints for update-verification code
  • Runtime monitoring for update attempts signed by unexpected intermediates or certificate branches

Organizations can identify similar weaknesses through:

  • Static analysis and code review of CMS, X.509, and certificate-path validation logic
  • Checks for trust decisions based directly on certificates embedded in untrusted messages
  • Tests using sibling intermediates, alternate chain paths, expired certificates, revoked certificates, and policy mismatches
  • Verification that update authorization is bound to an explicitly approved signer rather than only to a common root
  • CI or policy enforcement requiring documented trust anchors and signer constraints for update-verification code
  • Runtime monitoring for update attempts signed by unexpected intermediates or certificate branches

Sources

SourceLink
github.comgithub.com/sbabic/swupdate
github.comgithub.com/sbabic/swupdate/blob/2026.05.1/crypto/swupdate_cms_verify_openssl.c
github.comgithub.com/sbabic/swupdate/commit/e66c5640664a31668926a24c0c84b6b6570dc0d9
groups.google.comgroups.google.com/g/swupdate/c/dsoMcGFnEns
vulncheck.comvulncheck.com/advisories/swupdate-through-2026.05.1-cms-signature-verification-bypass-via-embedded-intermediates

Frequently asked

questions

Potentially. The attack can affect any deployment that receives and verifies a maliciously crafted update, but successful exploitation also requires an appropriately trusted signing key and a verification path that accepts the unauthorized intermediate.

No. The described condition involves possession of a signing key from a sibling intermediate under the same trusted root. The weakness is that this related certificate path may be accepted as sufficient update authority.

Restrict certificate-path construction and update authorization to explicitly approved signer identities and intermediates, while treating certificates embedded in CMS content as untrusted inputs.

Maintain narrowly scoped trust policies, test alternate certificate-chain scenarios, protect signing keys, and continuously review update-verification logic for authorization decisions based only on shared roots.

Potentially. The attack can affect any deployment that receives and verifies a maliciously crafted update, but successful exploitation also requires an appropriately trusted signing key and a verification path that accepts the unauthorized intermediate.

No. The described condition involves possession of a signing key from a sibling intermediate under the same trusted root. The weakness is that this related certificate path may be accepted as sufficient update authority.

Restrict certificate-path construction and update authorization to explicitly approved signer identities and intermediates, while treating certificates embedded in CMS content as untrusted inputs.

Maintain narrowly scoped trust policies, test alternate certificate-chain scenarios, protect signing keys, and continuously review update-verification logic for authorization decisions based only on shared roots.

Find out what's already
exploitable in your codebase.