{"id":"GHSA-9wrw-p9rm-r782","aliases":[],"status":"published","title":"onelogin/php-saml Improper signature validation on LogoutRequest/LogoutResponse.","description":"In order to verify Signatures on Logoutrequests and LogoutResponses we use\nthe verifySignature of the class XMLSecurityKey from the xmlseclibs library.\nThat method end up calling openssl_verify() depending on the signature algorithm used.\n\nThe openssl_verify() function returns 1 when the signature was successfully verified,\n0 if it failed to verify with the given key, and -1 in case an error occurs.\nPHP allows translating numerical values to boolean implicitly, with the following correspondences:\n- 0 equals false.\n- Non-zero equals true.\n\nThis means that an implicit conversion to boolean of the values returned by openssl_verify()\nwill convert an error state, signaled by the value -1, to a successful verification of the\nsignature (represented by the boolean true).\n\nThe LogoutRequest/LogoutResponse signature validator was performing an implicit conversion to boolean\nof the values returned by the verify() method, which subsequently will return the same output\nas openssl_verify() under most circumstances.\nThis means an error during signature verification is treated as a successful verification by the method.\n\nSince the signature validation of SAMLResponses were not affected, the impact of this security\nvulnerability is lower, but an update of the php-saml toolkit is recommended.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2024-05-17T23:06:54Z","modified":"2024-12-02T05:50:14Z","fixes":[{"ecosystem":"Packagist","package":"onelogin/php-saml","fixed_in":["2.10.4"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"onelogin/php-saml","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.10.4"}]}]},{"source":"osv","ecosystem":"Packagist","package":"onelogin/php-saml","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.10.4"}]}],"versions":["2.0.0","2.1.0","2.10.0","2.10.1","2.10.2","2.10.3","2.3.0","2.4.0","2.5.0","2.6.0","2.6.1","2.7.0","2.8.0","2.9.0","2.9.1"]}],"references":[{"url":"https://github.com/onelogin/php-saml/commit/949359f5cad5e1d085c4e5447d9aa8f49a6e82a1","tags":["web"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/onelogin/php-saml/2017-02-28.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-9wrw-p9rm-r782"},{"url":"https://github.com/SAML-Toolkits/php-saml","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-9wrw-p9rm-r782","title":"onelogin/php-saml Improper signature validation on LogoutRequest/LogoutResponse.","description":"In order to verify Signatures on Logoutrequests and LogoutResponses we use\nthe verifySignature of the class XMLSecurityKey from the xmlseclibs library.\nThat method end up calling openssl_verify() depending on the signature algorithm used.\n\nThe openssl_verify() function returns 1 when the signature was successfully verified,\n0 if it failed to verify with the given key, and -1 in case an error occurs.\nPHP allows translating numerical values to boolean implicitly, with the following correspondences:\n- 0 equals false.\n- Non-zero equals true.\n\nThis means that an implicit conversion to boolean of the values returned by openssl_verify()\nwill convert an error state, signaled by the value -1, to a successful verification of the\nsignature (represented by the boolean true).\n\nThe LogoutRequest/LogoutResponse signature validator was performing an implicit conversion to boolean\nof the values returned by the verify() method, which subsequently will return the same output\nas openssl_verify() under most circumstances.\nThis means an error during signature verification is treated as a successful verification by the method.\n\nSince the signature validation of SAMLResponses were not affected, the impact of this security\nvulnerability is lower, but an update of the php-saml toolkit is recommended.","status":"published","published":"2024-05-17T23:06:54Z","modified":"2024-05-17T23:06:55Z","updated_at":"2026-11-02T14:37:49.987036Z"}],"osv":[{"id":"GHSA-9wrw-p9rm-r782","title":"onelogin/php-saml Improper signature validation on LogoutRequest/LogoutResponse.","description":"In order to verify Signatures on Logoutrequests and LogoutResponses we use\nthe verifySignature of the class XMLSecurityKey from the xmlseclibs library.\nThat method end up calling openssl_verify() depending on the signature algorithm used.\n\nThe openssl_verify() function returns 1 when the signature was successfully verified,\n0 if it failed to verify with the given key, and -1 in case an error occurs.\nPHP allows translating numerical values to boolean implicitly, with the following correspondences:\n- 0 equals false.\n- Non-zero equals true.\n\nThis means that an implicit conversion to boolean of the values returned by openssl_verify()\nwill convert an error state, signaled by the value -1, to a successful verification of the\nsignature (represented by the boolean true).\n\nThe LogoutRequest/LogoutResponse signature validator was performing an implicit conversion to boolean\nof the values returned by the verify() method, which subsequently will return the same output\nas openssl_verify() under most circumstances.\nThis means an error during signature verification is treated as a successful verification by the method.\n\nSince the signature validation of SAMLResponses were not affected, the impact of this security\nvulnerability is lower, but an update of the php-saml toolkit is recommended.","status":"published","published":"2024-05-17T23:06:54Z","modified":"2024-12-02T05:50:14.504789Z","updated_at":"2026-11-02T15:46:44.225359Z"}]}}
