CASW070E SAML Response can not contain XPath, XSL or RetrievalMethod elements.
101
Created On 11/10/26 10:54 AM - Last Modified 11/10/26 13:01 PM
Symptom
After applying the CA19-10 Patch or deploying PVWA v10.10.1+ the following error is received when attempting to authenticate with SAML.
{"ErrorCode":"PASWS011E","ErrorMessage":"Missing mandatory parameter [username]."}
When reviewing the PVWA WebApplication.log, there is a more detailed error message:
[09/09/2019 | 09:53:24.725481] | {pid=11728} | {tid= 10284} | :: | CyberArk.PasswordVault.PASWebServices.MissingFieldException: PASWS011E Missing mandatory parameter [username]. ---> CyberArk.Services.Web.Exceptions.SAMLStructureValidationException: CASW070E SAML Response can not contain XPath, XSL or RetrievalMethod elements.
Environment
9.10;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10 Any PVWA that has been patched for the CA19-10 Security Bulletin (https://community.cyberark.com/s/article/CyberArk-Security-Bulletin-CA19-10) or any PVWA installation that includes the CA19-10 fix by default (v10.10.1+)
Cause
The CA19-10 patch introduced additional security checks for SAML authentication. One of those is to make sure that there is no attempt to modify the SAML xml response, to do this it checks if there are and XSL entries in the SAML response and rejects the response if it finds one.
Some SAML responses contain the parameter <ds:X509Certificate> which is the public key for the certificate used to sign the response. As this public key is just a random string of characters, there is the chance that it can contain the string 'XSL', which the security check picks up as a false positive and rejects the (valid) SAML response.
Resolution
There are 2 ways to resolve this issue:
- Create a new certificate that is used by the SAML IdP and ensure that the public key does not contain the characters 'XSL' next to each other.
- Some IdPs can be configured to not send the public key in the SAML response, so by preventing the public key from being included in the response, it cannot be incorrectly detected.