How to block HTTP OPTIONS request in AEM

ramgopalm545617

26-05-2020

We recently got a security vulnerability as below.

 

"OPTIONS method returned values including itself"

 

we wanted to block at AEM level using Apache Sling referrer filter by adding OPTIONS in 'filter.methods', and post updating the configurations, i was still able to get response for the below CURL request.

 

curl -i -X POST https://test.*****.com/

 

HTTP/1.1 200 OK
Date: Tue, 26 May 2020 18:28:02 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Allow: OPTIONS, TRACE, GET, HEAD
Content-Length: 0
Content-Security-Policy: frame-ancestors 'self';
Content-Type: text/html

 

request to please help me with any other config through which the OPTIONS method is blocked for all the URL's hosted on this AEM instance.

Accepted Solutions (1)

Accepted Solutions (1)

raghavc

26-05-2020

You can block it an the dispatcher level using the below config

 

/1040 { /type “deny" /method "OPTIONS" /url "*" }

 

Updating the Apache Referrer Filter to include OPTIONS method would only check if there is a referrer header in the request when you request using OPTIONS method.

Answers (2)

Answers (2)

hamidk92094312

Employee

26-05-2020

Review the following document. There are some OSGI settings that should be changed on your publish and author productive instances to avoid internal information leaking to the public. 

https://docs.adobe.com/content/help/en/experience-manager-65/administering/security/security-checkli...