kcve.ai취약점 정보 · 내 자산 확인

CVE-2021-27850 Bypass of the fix for CVE-2019-0195

CVE-2019-0195에 대한 수정 사항 우회

설명

A critical unauthenticated remote code execution vulnerability was found all recent versions of Apache Tapestry. The affected versions include 5.4.5, 5.5.0, 5.6.2 and 5.7.0. The vulnerability I have found is a bypass of the fix for CVE-2019-0195. Recap: Before the fix of CVE-2019-0195 it was possible to download arbitrary class files from the classpath by providing a crafted asset file URL. An attacker was able to download the file `AppModule.class` by requesting the URL `http://localhost:8080/assets/something/services/AppModule.class` which contains a HMAC secret key. The fix for that bug was a blacklist filter that checks if the URL ends with `.class`, `.properties` or `.xml`. Bypass: Unfortunately, the blacklist solution can simply be bypassed by appending a `/` at the end of the URL: `http://localhost:8080/assets/something/services/AppModule.class/` The slash is stripped after the blacklist check and the file `AppModule.class` is loaded into the response. This class usually contains the HMAC secret key which is used to sign serialized Java objects. With the knowledge of that key an attacker can sign a Java gadget chain that leads to RCE (e.g. CommonsBeanUtils1 from ysoserial). Solution for this vulnerability: * For Apache Tapestry 5.4.0 to 5.6.1, upgrade to 5.6.2 or later. * For Apache Tapestry 5.7.0, upgrade to 5.7.1 or later.

인증되지 않은 원격 코드 실행 취약점이 최근 버전의 Apache Tapestry에서 발견되었습니다. 영향을 받는 버전에는 5.4.5, 5.5.0, 5.6.2 및 5.7.0이 포함 됩니다. 제가 찾은 취약점은 CVE-2019-0195의 수정 사항을 우회하는 것입니다. 요약: CVE-2019-0195의 수정 전에 만들어진 자산 파일 URL을 제공하여 클래스 경로에서 임의의 클래스 파일을 다운로드할 수 있었습니다. 공격자가 HMAC 비밀 키를 포함하는 URL `http://localhost:8080/assets/something/services/AppModule.class`를 요청하여 `AppModule.class` 파일을 다운로드할 수 있었습니다. 이 버그를 수정한 것은 URL이 `.class`, `.properties` 또는 `.xml`으로 끝나는지 확인하는 블랙리스트 필터였습니다. 우회: 불행하게도, 블랙리스트 솔루션은 URL 끝에 `/`를 추가하여 우회할 수 있다: `http://localhost:8080/assets/something/services/AppModule.class/` 블랙리스트 검사 후 슬래시가 제거되고 `AppModule.class` 파일이 응답에 로드된다. 이 클래스는 일반적으로 직렬화된 Java 객체를 서명하는 데 사용되는 HMAC 비밀 키를 포함합니다. 그 키에 대한 지식을 통해 공격자는 RCE로 이어지는 Java 가젯 체인에 서명 할 수 있습니다 (예 : RCE). (영어) ysoserials1의 공용어. 이 취약점에 대한 해결책: * Apache Tapestry 5.4.0에서 5.6.1까지는 5.6.2 이상으로 업그레이드하십시오. * Apache Tapestry 5.7.0의 경우 5.7.1 이상으로 업그레이드하십시오.

영향 받는 제품 제품 2개

  • Apache Software Foundation

    Apache Tapestry

    영향 받는 버전

    • 버전 정보 확인 필요

    해결 버전

    해결 버전은 설명 참고

  • apache

    tapestry

    NVD 기준 해결 버전 있음

    영향 받는 버전

    • 5.4.0 이상 5.6.2 미만
    • 5.7.0 이상 5.7.1 미만

    해결 버전

    • 5.6.2 이상
    • 5.7.1 이상

참고 자료 3건

‹ 목록

점검 지원 범위 문의

도입 문의