Advisory

GHSA-ww7x-3gxh-qm6r

Also known as: CVE-2023-49087

Summary

Validation of SignedInfo

Details

Validation of an XML Signature requires verification that the hash value of the related XML-document (after any optional transformations and/or normalizations) matches a specific DigestValue-value, but also that the cryptografic signature on the SignedInfo-tree (the one that contains the DigestValue) verifies and matches a trusted public key.

Within the simpleSAMLphp/xml-security library (https://github.com/simplesamlphp/xml-security), the hash is being validated using SignedElementTrait::validateReference, and the signature is being verified in SignedElementTrait::verifyInternal

https://github.com/simplesamlphp/xml-security/blob/master/src/XML/SignedElementTrait.php:

afbeelding

What stands out is that the signature is being calculated over the canonical version of the SignedInfo-tree. The validateReference method, however, uses the original non-canonicalized version of SignedInfo.

Impact
If an attacker somehow (i.e. by exploiting a bug in PHP's canonicalization function) manages to manipulate the canonicalized version's DigestValue, it would be potentially be possible to forge the signature. No possibilities to exploit this were found during the investigation.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2023-11-28 18:52 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

simplesamlphp/xml-security

Packagist · All systems

Affected

  • introduced 1.6.11, fixed 1.6.12 (ecosystem)

Fixed versions

1.6.12

Fix

The export has no generic command for this ecosystem.

simplesamlphp/saml2

Packagist · All systems

Affected

  • introduced 5.0.0-alpha.12, fixed 5.0.0-alpha.13 (ecosystem)

Fixed versions

5.0.0-alpha.13

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences