🇰🇷 한글 설명
Apache Pulsar에서 네임스페이스 정책에 따라 메시지 암호화를 강제하도록 설정했음에도 불구하고, 토픽 초기화 과정 중 메타데이터 읽기 오류 등이 발생하면 암호화 요구 사항이 비활성화된 채로 토픽이 로드되는 취약점입니다. 이로 인해 인증된 클라이언트가 암호화되지 않은 메시지를 게시할 수 있게 되어 보안 정책이 무력화될 수 있습니다.
💡 쉬운 설명
보안을 위해 모든 메시지를 암호화하도록 설정해 두었지만, 시스템 오류가 발생하면 암호화 없이 메시지를 주고받을 수 있는 상태로 서비스가 운영되는 문제입니다. 공격자가 직접 암호화 키를 탈취하는 것은 아니지만, 암호화되지 않은 데이터가 시스템에 저장되는 보안 허점이 발생합니다.
🇺🇸 원문 (English)
Apache Pulsar allows an administrator to require end-to-end message encryption for all topics in a namespace by setting the encryption_required namespace policy. When this policy is set, the broker rejects messages that are published without encryption.
When the broker loads a persistent topic, it reads the namespace policies and the topic-level policies as part of topic initialization. If a step of this initialization fails, for example because of an error reading from the metadata store, a failure loading the topic-level policies or a failure in a later initialization step, the broker logs a warning, disables the encryption requirement for that topic, and completes the topic load as if it had succeeded. The topic is then served with encryption_required not enforced, even though the namespace policy requires it. Topic-level policies that could not be loaded are also not applied.
While the encryption requirement is not enforced, an authenticated client with permission to produce to the affected topic can publish messages that are not encrypted, and the broker accepts and stores them. This applies both to producers created after the topic was loaded and to producers that were already connected. Messages published with encryption remain encrypted; the issue does not expose the content of encrypted messages or the encryption keys.
The condition is not limited to transient failures. If the cause of the initialization failure persists, the encryption requirement is disabled again each time the topic is loaded, for example after a topic unload, a namespace bundle reassignment or a broker restart. An update to the namespace policies restores enforcement on a loaded topic, but only until the topic is loaded again. Enforcement is reliably restored only once the underlying cause of the failure has been resolved and the topic has been loaded again. The broker logs a warning when the encryption requirement is disabled, but the topic load is reported as successful and the state of the encryption requirement is not shown in the topic statistics.
In fixed versions, a failure during topic initialization causes the topic load to fail so that it can be retried, instead of loading the topic with the encryption requirement disabled.
This issue affects Apache Pulsar versions from 1.22.0-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 who rely on encryption_required and cannot upgrade immediately can monitor the broker logs for warnings containing "isEncryptionRequired will be set to false" (the exact wording of the message differs between releases), resolve the underlying cause of the failure, and then reload the affected topic and confirm that the warning does not recur.
📍 영향받는 시스템
Apache Pulsar 1.22.0-incubating < 4.0.14, 4.1.0 < 4.2.5
⚔️ 공격 벡터
메타데이터 저장소 오류 등을 유도하여 토픽 초기화 실패를 일으킨 후, 암호화되지 않은 메시지를 게시함
🛡️ 대응 방법
Apache Pulsar를 4.0.14 또는 4.2.5 이상의 패치된 버전으로 업그레이드하십시오.
🔧 검증 코드
로그 파일에서 'isEncryptionRequired will be set to false' 경고 메시지가 발견되면 암호화 강제 정책이 해제된 상태입니다.
pulsar-admin clusters get <cluster-name> && pulsar-admin namespaces list <namespace> && grep -r "isEncryptionRequired will be set to false" /path/to/pulsar/logs/