Résumé
SAML2: Incomplete fix of CVE-2026-49283: unsigned embedded Response bypasses HTTP-Artifact signature verification (no embedded-Issuer binding)
Détails de l’avis
Summary
CVE-2026-49283 / GHSA-6929-8p9f-26jx ("HTTP-Artifact TLS validator confusion allows cross-IdP authentication bypass") was fixed so that HTTPArtifact::receive() verifies the embedded SAML Response using the IdP metadata signing keys. The current implementation (master 31c72c1d, released v6.2.3) reaches that verification only when the embedded Response is signed:
// src/Binding/HTTPArtifact.php (receive())
if (!$samlResponse->isSigned()) {
return $samlResponse; // ← unsigned embedded Response returned UNVERIFIED
}
return $this->verifyMessageSignature($samlResponse, $idpMetadata); // only runs when signed
An attacker who controls one trusted-federation IdP therefore returns a validly-signed outer ArtifactResponse (signed with their own real key, which passes the mandatory outer check) that wraps an unsigned <samlp:Response> whose <Issuer> names a different IdP. isSigned() is false, so verifyMessageSignature() never runs and the forged Response is returned as successfully received. Additionally, even on the signed path verifyMessageSignature() verifies against the artifact issuer's metadata keys but never asserts that the embedded Response's <Issuer> equals the artifact issuer — the same cross-IdP confusion the CVE was assigned for is not closed by identity binding.
This is an incomplete implementation of the fix's own stated goal ("verify signatures using IdP metadata signing keys", commit dac0b4b6 / #419), and a regression introduced by the #414 refactor (v6.2.2) — the official CVE fix in v6.2.1 did not contain this short-circuit.
Affected component
src/Binding/HTTPArtifact.phpreceive()line 206-207:if (!$samlResponse->isSigned()) { return $samlResponse; }— the bypassed guard.receive()line 210:verifyMessageSignature($samlResponse, $idpMetadata)— only reached when signed.verifyMessageSignature()lines 230-286: verifies against$idpMetadata(artifact-issuer keys); nogetIssuer()comparison to bind the embedded Response to the artifact issuer.verifyArtifactResponseSignature()line 300-302:if ($artifactResponse->isSigned() !== true) throw— the OUTER response is mandatorily signed; the asymmetry with the embeddedreturn-on-unsigned is the defect.
- Regression commit 3b589636 (#414, v6.2.2, "refactor/soap-ssl-validator-openssl"); key-source fix dac0b4b6 (#419) left the short-circuit unchanged.
- Affected: v6.2.2, v6.2.3 (latest), and master. v6.2.1 (official CVE fix) used a deferred-validator model without this short-circuit.
Reachability (hop-by-hop, guards named)
Threat model: SP uses the HTTP-Artifact binding in a multi-IdP federation; attacker operates one trusted IdP-B (valid saml20-idp-remote metadata, real signing key, an ArtifactResolutionService). Goal: impersonate admin@IdP-A.
- Attacker hits the SP artifact endpoint with
SAMLartencodingsourceId = sha1(IdP-B entityID)— line 137-138, no guard. getMetaDataConfigForSha1→$idpMetadata= IdP-B — line 144. Guard: metadata exists → satisfied (IdP-B trusted).- SP resolves against IdP-B's ARS (attacker's endpoint) — line 176-182.
- IdP-B returns a validly-signed
ArtifactResponse;verifyArtifactResponseSignature(...,IdP-B)passes (signed by the artifact issuer) — line 193/300. Guard satisfied by the attacker (they ARE the artifact issuer). - The signed outer wraps an unsigned
<samlp:Response Issuer=IdP-A>with an assertion foradmin@IdP-A— line 195, no guard on embedded content. if (!$samlResponse->isSigned()) return $samlResponse;→ TRUE → returns the forged Response unverified — line 206-207.verifyMessageSignature(210) never runs; there is no issuer==artifact-issuer check anywhere inreceive().
Every guard on the embedded message is absent; the outer/embedded mandatory-vs-optional asymmetry is the root cause.
Root cause
The #414 refactor moved embedded-Response verification into receive() but gated it on isSigned() (mirroring if (!isSigned()) return instead of the outer's if (isSigned() !== true) throw), and the dac0b4b6 key-source fix did not revisit that gate. The artifact binding's designed trust model is that the embedded message is authenticated by the binding (the assertion need not be individually signed), so a conformant integrator relies on receive() to have authenticated it — exactly the reliance this gap defeats.
Proof of concept (executed, benign)
The PoC exercises the real shipped private methods verifyArtifactResponseSignature() and
verifyMessageSignature() via reflection — exactly as the maintainers' own
tests/SAML2/Binding/HTTPArtifactTest.php does — and reproduces receive()'s verbatim
post-resolution decision (lines 195/206-210) against real HTTPArtifact internals. It models a
validly-signed outer ArtifactResponse from the artifact issuer IdP-B (attacker-controlled,
its signing cert in metadata) wrapping an unsigned embedded <samlp:Response> claiming
Issuer=IdP-A. No destructive payload; the marker is the SKIPPED verification.
Run: vendor/bin/phpunit --no-coverage tests/SAML2/Binding/PocArtifact001Test.php
// tests/SAML2/Binding/PocArtifact001Test.php (namespace SimpleSAML\Test\SAML2\Binding)
// IdP-B metadata (artifact issuer, attacker-controlled) with a real signing cert:
$idpB = Configuration::loadFromArray(['entityid' => 'https://idp-b.example/', 'keys' => [[
'type' => 'X509Certificate', 'signing' => true, 'encryption' => false,
'X509Certificate' => PEMCertificatesMock::getPlainCertificateContents(),
]]], '[idp-b]');
$ha = new HTTPArtifact();
// Forged embedded Response: UNSIGNED, claims Issuer=IdP-A; verify() throws if ever called.
$embedded = $this->createStub(Response::class);
$embedded->method('isSigned')->willReturn(false);
$embedded->method('getSignature')->willReturn(null);
$embedded->method('verify')->willThrowException(new Exception('POC-FAIL: embedded verify() called'));
// Outer ArtifactResponse: validly signed by IdP-B (verify() returns self), wraps the embedded.
$outer = $this->createStub(ArtifactResponse::class);
$outer->method('isSigned')->willReturn(true);
$outer->method('isSuccess')->willReturn(true);
$outer->method('verify')->willReturnCallback(fn() => $outer);
$outer->method('getSignature')->willReturn(self::sigEl());
$outer->method('getMessage')->willReturn($embedded);
// ---- verbatim HTTPArtifact::receive() post-resolution logic ----
$verifiedOuter = $this->call($ha, 'verifyArtifactResponseSignature', $outer, $idpB); // OUTER mandatory — passes vs IdP-B
$samlResponse = $verifiedOuter->getMessage();
$verifyMessageSignatureCalled = false;
if (!$samlResponse->isSigned()) { $received = $samlResponse; } // <-- BYPASS (line 206-207)
else { $verifyMessageSignatureCalled = true; $received = $this->call($ha,'verifyMessageSignature',$samlResponse,$idpB); }
self::assertFalse($samlResponse->isSigned());
self::assertFalse($verifyMessageSignatureCalled, 'verifyMessageSignature SKIPPED');
self::assertSame($embedded, $received, 'unsigned embedded Response returned unverified');
// Negative control: the real verifier CANNOT accept the unsigned message → the short-circuit is load-bearing.
$threw = false; try { $this->call($ha,'verifyMessageSignature',$samlResponse,$idpB); } catch (\Throwable $e) { $threw = true; }
self::assertTrue($threw, 'real verifyMessageSignature rejects the unsigned Response');
Observed benign output:
PHPUnit 13.2.4 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.5
[POC] SAML2-ARTIFACT-001 CONFIRMED: signed outer ArtifactResponse (IdP-B) + UNSIGNED embedded Response
=> receive() returns it with verifyMessageSignature() SKIPPED; the real verifier would reject it.
. 1 / 1 (100%)
OK (1 test, 5 assertions)
The five assertions prov
Références
- https://github.com/advisories/GHSA-r7hw-jx6r-756g
- https://github.com/simplesamlphp/saml2/security/advisories/GHSA-r7hw-jx6r-756g
- https://nvd.nist.gov/vuln/detail/CVE-2026-110782
- https://github.com/simplesamlphp/saml2/commit/7b7fbb5322cb5607db3e5a329681f4886b1449fe
- https://github.com/simplesamlphp/saml2/commit/9a21edb96de1f3ece3b40ccbe3b7de761917a06f
- https://github.com/simplesamlphp/saml2/releases/tag/v6.2.4
- https://github.com/simplesamlphp/saml2/releases/tag/v7.0.0-rc2
Vulnérabilités liées
Tout Supply chain →- HIGHCVE-2026-61436
PraisonAI: AgentMail webhook mode accepts forged unsigned message.received events and invokes agents
- HIGHCVE-2026-64855
soapbar: verify_envelope_bsp accepts an unauthenticated embedded certificate (signature forgery / authentication bypass)
- HIGHCVE-2026-58262
Klever Go counts bitmap padding bits toward BLS quorum, allowing blocks with insufficient signatures
- CRITICALCVE-2026-133469
Xen Orchestra: Empty-object login token
- HIGHCVE-2026-75522
OpenID4VP: X.509 chain validation accepts a forged certificate that reuses a trusted anchor's Subject DN without verifying its signature
- HIGHCVE-2026-76101
keystore-go: Keystore integrity and password verification bypass via stripped trailing digest in Decode()