Published: 31st August 2016
Following four scenarios were found to be vulnerable to XML Signature Wrapping (XSW) attacks, in the WSO2 platform:
- Jaggery-based applications in the WSO2 product stack (e.g: API Store, API Publisher, App Store) are found to be vulnerable only when SAML 2.0 based Single Sign On (SSO) is enabled.
- The OAuth SAML 2.0 bearer grant type implementation ships with WSO2 Identity Server and WSO2 API Manager.
- SAML 2.0 federated authenticator in WSO2 Identity Server, which are used to connect to external identity providers.
- The SAML 2.0 web agent, which is used to enforce SSO for web apps deployed in WSO2 Application Server.
All of the above attacks can only be executed by a valid, legitimate user in the system. The attacker would exploit this vulnerability either to impersonate another user or to escalate his own privileges in the system.
If you have enabled SAML 2.0 based SSO for Management Consoles of any of the WSO2 products with the default configuration settings (response signing enabled), the access to the Management Console is NOT vulnerable to the XSW attacks.
None of the external applications (e.g: Google Apps, Salesforce) using WSO2 Identity Server as the SAML 2.0 or WS-Federation Identity Provider are vulnerable to this attack.
In order to preserve the integrity of the SAML assertion and response sent by the SAML Identity Provider to the Service Provider (relying party), XML signatures are used. The relying party can validate the signature of the assertion and response for ensuring that the original message is not altered. In XML Signature Wrapping attacks, the structure of the message is altered such that the relying party can be tricked when it parses the XML message.
The attacker should possess a valid SAML token in hand for wrapping the signature and forwarding to the relying party. Therefore the attacker must be an internal user of the organization who already possesses a valid user account in the system.
Through a successful exploit of the vulnerability, the attacker would be able to impersonate a user and gain access to the SAML SSO consumer applications that the victim is authorized.
However the attack would only be possible where the WSO2 products act as the SAML consumer (e.g. API Manager Store/Publisher, Identity Server Dashboard). Other SAML relying party websites/applications that use WSO2 Identity Server as an Identity Provider have no impact from this attack.
After applying below patches, WSO2 products correctly validate SAML responses and assertions in SAML consumer applications and avoid possible XML Signature Wrapping (XSW) attacks.
Apply the following patches based on your products by following the instructions in the README file.
if you have any questions, post them to email@example.com
Please download the relevant patches based on the products you use following the matrix below. Patches can also be downloaded from http://wso2.com/security-patch-releases/.
WSO2 API Manager
WSO2 API Manager Analytics
WSO2 App Manager
WSO2 Application Server
WSO2 Business Process Server
WSO2 Business Rules Server
WSO2 Complex Event Processor
WSO2 Data Analytics Server
WSO2 Dashboard Server
WSO2 Data Services Server
WSO2 Enterprise Mobility Manager
WSO2 Identity Server
WSO2 Message Broker
WSO2 Machine Learner
If you are using newer versions of the products than the ones mentioned in the “SOLUTION” section, this vulnerability is fixed.