🇰🇷 한글 설명
Apache Hive 4.2.1 미만 버전의 Avro SerDe 스키마 해석 과정에서 발생하는 SSRF 취약점입니다. CREATE TABLE 권한을 가진 인증된 공격자가 avro.schema.url 속성에 악의적인 URL을 설정하여 Hive 서버가 내부 네트워크 서비스나 클라우드 메타데이터에 접근하도록 유도할 수 있습니다.
💡 쉬운 설명
해커가 가짜 주소를 입력해두면, 서버가 그 주소에 있는 정보를 몰래 가져오게 만드는 공격입니다. 이를 통해 서버 내부의 중요한 정보나 클라우드 관리 정보를 탈취할 수 있습니다.
🇺🇸 원문 (English)
Server-Side Request Forgery (SSRF) in Avro SerDe schema resolution in Apache Hive before 4.2.1 allows an authenticated remote attacker with CREATE TABLE privilege to cause the Hive server to fetch an attacker-controlled URL when resolving the avro.schema.url table property on an Avro table that is subsequently queried. This can expose cloud instance metadata, internal network services, or local server files to the Hive process identity. Users are recommended to upgrade to version 4.2.1, which fixes this issue.
Attacker access requirements:
* Network access to HiveServer2 / Metastore: required (remote attacker model).
* Valid Hive authentication: required.
* CREATE TABLE (or equivalent) privilege: required, so the attacker can set avro.schema.url in table properties.
* SELECT privilege on the malicious table: not required for the creator, who can typically query their own table; any other user granted SELECT can also trigger the fetch.
* Write access to the table LOCATION: not required; the attack uses the schema URL, not the data path.
* Admin / superuser privileges: not required; an ordinary authenticated user with DDL rights is sufficient.
* External tables enabled: typically required in practice, and enabled by default in most deployments.
Detection guidance:
* Inspect metastore / Hive table metadata for Avro tables whose avro.schema.url uses unexpected schemes such as http, https, file, or ftp, or points at link-local / cloud metadata addresses (for example 169.254.169.254) or other internal hosts.
* Review HiveServer2 and Metastore logs around CREATE/ALTER TABLE and queries against Avro tables for schema-resolution failures or outbound fetches of avro.schema.url.
* Correlate CREATE TABLE / ALTER TABLE activity that sets avro.schema.url with subsequent SELECT activity on the same table, especially when the URL target is unusual for schema distribution.
* On cloud deployments, check instance / VPC flow logs and metadata service access logs for unexpected requests from Hive host identities shortly after Avro DDL or query activity.
📍 영향받는 시스템
Apache Hive versions before 4.2.1
⚔️ 공격 벡터
CREATE TABLE 권한을 이용해 avro.schema.url 속성에 악의적인 URL을 설정한 후 해당 테이블을 쿼리함
🛡️ 대응 방법
Apache Hive를 4.2.1 버전 이상으로 업그레이드하십시오.
🔧 검증 코드
출력된 버전이 4.2.1보다 낮으면 취약한 버전이 설치되어 있는 것입니다.
hive --version | grep -E 'Apache Hive [0-9]\.[0-9]\.[0-9]' | awk '{print $3}' | awk -F. '{print $1"$"$2"$"$3}' | grep -v '4.2.1'