A Server Side Request Forgery vulnerability has been recently discovered in an AEM path that can be abused to leak IAM instance role credentials from the AWS or Azure instance metadata service. This vulnerability is found within the Salesforce MCM bundle.
A vulnerable AEM instance will return temporary API keys. Those API keys expire within hours and have permissions equivalent to the ManagedServicesBigBearInstance role.
The preferred mitigation is to disable Salesforce bundle. To do this, please follow the procedure below:
-
Finally, confirm that the URLs are not returning the key information. You can do this by accessing these two URLs:
- http://publishurl:pubishport/libs/mcm/salesforce/customer.html%3b%0aa.css?checkType=authorize&authorization_url=http://169.254.169.254/latest/meta-data/iam/security-credentials/ManagedServicesBigBearInstance&customer_key=zzzz&customer_secret=zzzzredirect_uri=xxxx&code=e
- http://authorandpublishurl:port/libs/mcm/salesforce/customer.html%3b%0aa.css?checkType=authorize&authorization_url=http://169.254.169.254/latest/metadata/iam/security-credentials/ManagedServicesBigBearInstance&customer_key=zzzz&customer_secret=zzzz&redirect_uri=xxxx&code=e
First, check whether you are using the AEM Salesforce integration. You can do this by:
- Browse to http://serveraddress:serverip/etc/cloudservices/salesforce.html and check whether the dashboard says that the service is enabled or not
- Or by running this cURL command:
- curl -s -u "admin:$(pass CQ_Admin)" serveraddress:serverport/etc/cloudservices/salesforce.html|grep enabled|wc -l
-
Identify the config file that controls the Dispatcher rules. Generically, you can do this by browsing to /etc/httpd/conf/ and looking for *.any files as shown below:
Opomba:
Paths and filenames can differ depending on the configuration of your instance.
cd /etc/httpd/conf/ cat dispatcher.any cat publish-farm.any
-
Finally, confirm the URLs are not returning the key information by accessing these URLs:
- http://publishurl:pubishport/libs/mcm/salesforce/customer.html%3b%0aa.css?checkType=authorize&authorization_url=http://169.254.169.254/latest/meta-data/iam/security-credentials/ManagedServicesBigBearInstance&customer_key=zzzz&customer_secret=zzzzredirect_uri=xxxx&code=e
- http://authorandpublishurl:port/libs/mcm/salesforce/customer.html%3b%0aa.css?checkType=authorize&authorization_url=http://169.254.169.254/latest/metadata/iam/security-credentials/ManagedServicesBigBearInstance&customer_key=zzzz&customer_secret=zzzz&redirect_uri=xxxx&code=e