Vulnerability DatabaseGHSA-h8fv-vm7c-r6fh

GHSA-h8fv-vm7c-r6fh: 
PHP vulnerability analysis and mitigation

Summary

One defect on one line of src/Binding/HTTPRedirect.php, present in the released v6.2.4 (the version GHSA-r7hw-jx6r-756g names as patched) and on master: The HTTP-Redirect binding verifies the query-string signature against SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock — the test keypair that ships in simplesamlphp/xml-security — instead of the peer's metadata key. Anyone can produce a "validly signed" SAMLRequest/SAMLResponse on this binding, and a genuinely signed message from the real peer fails.

1. Redirect-binding signatures are checked against the bundled test certificate

src/Binding/HTTPRedirect.php at v6.2.4 — import at :24, use at :199-205:

use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock;
...
        $container = ContainerSingleton::getInstance();
        $blacklist = $container->getBlacklistedEncryptionAlgorithms();
        $verifier = (new SignatureAlgorithmFactory($blacklist))->getAlgorithm(
            $query['SigAlg'],
            // TODO:  Need to use the key from the metadata
            PEMCertificatesMock::getPublicKey(PEMCertificatesMock::SELFSIGNED_PUBLIC_KEY),
        );
        if ($verifier->verify($signedQuery, base64_decode($query['Signature'])) === false) {
            throw new SignatureVerificationFailedException('Failed to verify signature.');
        }
        return $message;

PEMCertificatesMock lives in the TestUtils namespace of simplesamlphp/xml-security and is installed as a normal runtime dependency, so both halves of that keypair are public. The consequences are symmetric and both bad:

  • An attacker signs their own SAMLRequest/SAMLResponse query string with the published SELFSIGNED private key. verify() returns true and receive() returns the message as successfully verified.
  • The real peer's signature, made with its metadata key, does not verify, so SignatureVerificationFailedException is thrown for legitimate traffic. This is on the library's ordinary dispatch path: Binding::getCurrentBinding() (src/Binding.php:55-56,

:82-89) returns new HTTPRedirect() for any GET carrying SAMLRequest or SAMLResponse, so a consumer that uses the binding layer reaches it without doing anything unusual. Note also :181-183 — when the Signature parameter is absent the message is returned without any verification, which is correct for the binding (the profile decides whether a signature is required) but means that between the two paths receive() never authenticates anything: no signature is accepted as-is, and a signature is accepted when it was made with a key the whole world has. For an IdP built on this library the immediate consequence is forged signed LogoutRequests (log out any subject) and forged signed AuthnRequests attributed to a trusted SP; for an SP, forged LogoutResponse/LogoutRequest.

CVSS v4.0

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N — 9.1 Critical. AT:P is "the consumer uses Binding::getCurrentBinding() / HTTPRedirect::receive() and relies on its signature check". A consumer that verifies signatures itself is unaffected, which is the only thing holding this below a flat 10.

Suggested fix

The TODO is the fix: take the key from the peer's metadata, the way HTTPArtifact::verifyMessageSignature() already does with $idpMetadata->getPublicKeys('signing', true). Until that plumbing exists, the safer interim behaviour is to refuse rather than to verify against a known key:

        throw new \RuntimeException(
            'HTTP-Redirect signature verification requires the peer metadata key; ' .
            'verify the signature in the caller until this is implemented.'
        );

so that a consumer relying on the binding fails closed instead of accepting attacker signatures. A CI grep that fails the build when anything under src/ imports SimpleSAML\XMLSecurity\TestUtils\ would stop the class of mistake.


Source: NVD

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-h8fv-vm7c-r6fhCRITICALN/A
  • PHP logoPHP
  • simplesamlphp/saml2
NoNoNov 24, 2026
GHSA-5vjv-wq72-r667MEDIUMN/A
  • PHP logoPHP
  • youthweb/bbcode-parser
NoYesNov 24, 2026
GHSA-3685-v2g8-q27vMEDIUMN/A
  • PHP logoPHP
  • youthweb/bbcode-parser
NoYesNov 24, 2026
GHSA-26cq-29p9-57xjMEDIUMN/A
  • PHP logoPHP
  • youthweb/bbcode-parser
NoYesNov 24, 2026
GHSA-pm4m-j3qg-fqqqMEDIUMN/A
  • PHP logoPHP
  • youthweb/bbcode-parser
NoYesNov 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management