1. 소식
Apache Tomcat의 CORS 필터 기본 설정과 관련해 Mark Thomas가 공개한 보안 권고입니다. 해당 취약점은 CVE-2018-8014로 식별되며, 심각도는 Low로 분류되었습니다.
핵심은 CORS 필터의 기본값이 모든 Origin에 대해 supportsCredentials를 허용하는 방향으로 설정되어 있어, 기본 설정을 그대로 사용하는 경우 의도하지 않은 교차 출처 요청이 자격 증명과 함께 허용될 수 있다는 점입니다. 다만 권고문에서는 일반적으로 운영 환경에 맞게 CORS 필터를 별도로 설정해 사용했을 것으로 예상하므로, 대부분의 사용자는 영향을 받지 않을 것으로 설명하고 있습니다.
2. 내용
출처 : http://mail-archives.us.apache.org/mod_mbox/www-announce/201805.mbox/%3Ccb3c84a5-b3e7-2bfa-ba56-b97ecd934634@apache.org%3E
CVE-2018-8014 Insecure defaults for CORS filter Severity: Low Vendor: The Apache Software Foundation Versions Affected: Apache Tomcat 9.0.0.M1 to 9.0.8 Apache Tomcat 8.5.0 to 8.5.31 Apache Tomcat 8.0.0.RC1 to 8.0.52 Apache Tomcat 7.0.41 to 7.0.88 Description: The defaults settings for the CORS filter are insecure and enable 'supportsCredentials' for all origins. It is expected that users of the CORS filter will have configured it appropriately for their environment rather than using it in the default configuration. Therefore, it is expected that most users will not be impacted by this issue. Mitigation: Users of the affected versions should apply one of the following mitigations. - Configure the filter appropriately for your environment Secure defaults will be provided in the following versions: - Apache Tomcat 9.0.9 or later when released - Apache Tomcat 8.5.32 or later when released - Apache Tomcat 8.0.53 or later when released - Apache Tomcat 7.0.89 or later when released History: 2018-05-15 Original advisory References: [1] http://tomcat.apache.org/security-9.html [2] http://tomcat.apache.org/security-8.html [3] http://tomcat.apache.org/security-7.html
3. 확인 및 조치
Tomcat에서 CORS 필터를 사용 중이라면, 우선 애플리케이션의 web.xml 또는 필터 설정 위치에서 CORS 관련 설정을 확인해야 합니다. 특히 기본 설정에 의존하고 있지 않은지, 허용할 Origin을 명시적으로 제한하고 있는지, 자격 증명 전송이 실제로 필요한 경우에만 허용하고 있는지 점검하는 것이 좋습니다.
영향을 받는 버전을 사용 중이고 CORS 필터가 활성화되어 있다면, 권고문에 나온 것처럼 운영 환경에 맞게 필터를 명시적으로 설정해야 합니다. 가능하다면 권고문에서 언급한 보안 기본값이 반영된 Tomcat 버전 이상으로 업그레이드하는 것도 함께 검토하는 것이 안전합니다.