🇰🇷 한글 설명
Apache Pulsar의 Functions Worker REST API에서 발생하는 권한 검증 미흡 취약점입니다. 인증된 사용자가 함수 관리 권한을 이용해 자신이 메시지를 발행할 권한이 없는 다른 테넌트나 토픽에 Functions Worker의 권한을 빌려 메시지를 강제로 발행할 수 있습니다. 이로 인해 대상 토픽의 데이터 무결성이 훼손될 수 있습니다.
💡 쉬운 설명
함수를 실행할 수 있는 권한을 가진 사람이, 원래는 접근할 수 없는 다른 데이터 통로(토픽)에 가짜 데이터를 몰래 집어넣을 수 있는 문제입니다. 시스템이 명령을 내린 사람이 누구인지 확인하는 과정에서, 명령을 전달하는 중간 도구의 권한을 과도하게 허용하기 때문에 발생합니다.
🇺🇸 원문 (English)
The Pulsar Functions Worker provides a REST API endpoint for triggering a function, which publishes a caller-supplied value to one of the function's configured input topics. The Functions Worker performs this publish with its own broker client, which authenticates with the Worker's configured broker-client credentials rather than the credentials of the API caller.
When authorization is enabled, in Apache Pulsar 2.4.0 and later versions, the trigger endpoint checks only that the caller is authorized to perform function operations in the function's namespace. It does not check that the caller is authorized to produce to the input topic that the message is published to. Versions before 2.4.0 do not perform a caller authorization check for the trigger endpoint at all. Function input topics are not restricted to the function's own tenant or namespace, and registering a function does not require produce permission on its input topics.
As a result, an authenticated user who is authorized to manage functions in a namespace, for example a role granted the functions permission on that namespace, can cause the Functions Worker to publish messages with caller-controlled content to a topic that the user is not authorized to produce to, including topics in other tenants. These messages are published under the identity of the Functions Worker. The issue does not require any function instance to be running or any function code to be executed. It requires that the Functions Worker's broker-client identity is itself authorized to produce to the target topic and, in Apache Pulsar 2.3.0 and later versions, to list the subscriptions of the target topic, as is the case when that identity is a superuser. The impact is on the integrity of the data in the affected topics: consumers of those topics may receive messages from a user who is not permitted to publish them. This concerns the Functions Worker REST API as called by an external, authenticated client; it does not change the security model for function code, which must be fully trusted.
In fixed versions, when authorization is enabled, triggering a function additionally requires the caller to be authorized to produce to the selected input topic before any message is published.
This issue affects Apache Pulsar versions from 2.0.0-rc1-incubating before 4.0.14 and from 4.1.0 before 4.2.5.
- 4.0.x version users should upgrade to at least 4.0.14.
- 4.1.x and 4.2.x version users should upgrade to at least 4.2.5.
Users operating versions prior to those listed above should upgrade to the aforementioned patched versions or newer versions.
The currently supported Apache Pulsar release lines are 4.0.x and 5.0.x. The supported versions schedule is available at https://pulsar.apache.org/contribute/release-policy/.
Users of Apache Pulsar 2.4.0 and later versions with authorization enabled who cannot upgrade immediately can limit the permission to manage functions to trusted roles. Users of versions before 2.4.0 should restrict access to the Functions Worker REST API to trusted callers, because in these versions the trigger endpoint does not check the caller's permission to manage functions.
📍 영향받는 시스템
Apache Pulsar 2.0.0-rc1-incubating ~ 4.0.13, 4.1.0 ~ 4.2.4
⚔️ 공격 벡터
인증된 사용자가 Functions Worker의 REST API 엔드포인트를 호출하여 권한이 없는 토픽으로 메시지 발행 유도
🛡️ 대응 방법
Apache Pulsar 4.0.14 또는 4.2.5 이상의 패치된 버전으로 업그레이드
🔧 검증 코드
출력된 버전이 취약한 범위(4.0.14 미만 또는 4.2.5 미만)에 해당하는지 확인합니다.
python3 -c 'import re; import subprocess; cmd="pulsar-admin --version"; res=subprocess.check_output(cmd, shell=True).decode().strip(); print(res)'
💻 영향받는 소프트웨어
IBM Verify Identity Access