CVE-2024-28253 SpEL Injection in `PUT /api/v1/policies` in OpenMetadata
OpenMetadata에서 `PUT /api/v1/policies`에 SpEL 주입
설명
OpenMetadata is a unified platform for discovery, observability, and governance powered by a central metadata repository, in-depth lineage, and seamless team collaboration. `CompiledRule::validateExpression` is also called from `PolicyRepository.prepare`. `prepare()` is called from `EntityRepository.prepareInternal()` which, in turn, gets called from `EntityResource.createOrUpdate()`. Note that even though there is an authorization check (`authorizer.authorize()`), it gets called after `prepareInternal()` gets called and therefore after the SpEL expression has been evaluated. In order to reach this method, an attacker can send a PUT request to `/api/v1/policies` which gets handled by `PolicyResource.createOrUpdate()`. This vulnerability was discovered with the help of CodeQL's Expression language injection (Spring) query and is also tracked as `GHSL-2023-252`. This issue may lead to Remote Code Execution and has been addressed in version 1.3.1. Users are advised to upgrade. There are no known workarounds for this vulnerability.
OpenMetadata는 중앙 메타데이터 저장소, 심층적인 계보, 원활한 팀 협업을 기반으로 하는 검색, 관찰성, 거버넌스를 위한 통합 플랫폼입니다. `CompiledRule:::validateExpression`은 `PolicyRepository.prepare`에서도 호출됩니다. `prepare()`는 `EntityRepository.prepareInternal()`에서 호출됩니다. 비록 인증 검사('authorizer.authorize()')가 있더라도, 그것은 `prepareInternal()`이 호출된 후에, 그리고 SpEL 표현식이 평가된 후에 호출된다는 것을 주의하라. 이 메서드에 도달하기 위해 공격자는 PUT 요청을 `PolicyResource.createOrUpdate()`가 처리하는 `/api/v1/policies`로 보낼 수 있습니다. 이 취약점은 CodeQL의 Expression language injection (Spring) 질의를 통해 발견되었으며 `GHSL-2023-252`로도 추적됩니다. 이 문제는 원격 코드 실행으로 이어질 수 있으며 버전 1.3.1에서 해결되었습니다. 사용자는 업그레이드하는 것이 좋습니다. 이 취약점에 대한 알려진 해결 방법은 없습니다.
영향 받는 제품 제품 1개
-
해결 버전 있음
open-metadata
OpenMetadata
영향 받는 버전
- 1.3.1 미만
해결 버전
- 1.3.1 이상
참고 자료 6건
- codeql.github.com https://codeql.github.com/codeql-query-help/java/java-spel-expression-injection (새 창)
- github.com https://github.com/open-metadata/OpenMetadata/blob/b6b337e09a05101506a5faba4b45d370cc3c9fc8/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java#L693 (새 창)
- github.com https://github.com/open-metadata/OpenMetadata/blob/b6b337e09a05101506a5faba4b45d370cc3c9fc8/openmetadata-service/src/main/java/org/openmetadata/service/resources/EntityResource.java#L219 (새 창)
- github.com https://github.com/open-metadata/OpenMetadata/blob/b6b337e09a05101506a5faba4b45d370cc3c9fc8/openmetadata-service/src/main/java/org/openmetadata/service/resources/policies/PolicyResource.java#L365 (새 창)
- github.com https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/PolicyRepository.java#L113 (새 창)
- github.com https://github.com/open-metadata/OpenMetadata/security/advisories/GHSA-7vf4-x5m2-r6gr (새 창)