🇰🇷 한글 설명
Apache Camel Salesforce 컴포넌트에서 사용자 제어 헤더를 통한 권한 우회 및 인젝션 취약점이 발견되었습니다. 공격자가 HTTP 요청 헤더를 통해 SOQL/SOSL 쿼리, 대상 SObject, Apex REST URL 등을 조작하여 Salesforce 데이터에 무단 접근하거나 파괴적인 작업을 수행할 수 있습니다.
💡 쉬운 설명
외부에서 들어오는 요청에 포함된 특정 이름의 헤더가 필터링되지 않고 시스템 내부 설정값으로 그대로 사용되는 문제입니다. 이를 통해 공격자는 원래 의도된 동작을 가로채고 Salesforce의 데이터를 마음대로 조회하거나 수정할 수 있습니다.
🇺🇸 원문 (English)
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), Authorization Bypass Through User-Controlled Key vulnerability in Apache Camel Salesforce Component.
The camel-salesforce producer resolves its operation parameters - the SOQL query, the SOSL search, the target SObject name and id, the Apex REST URL and method, and the Apex query parameters - from Exchange message headers, reading the header in preference to the value configured on the endpoint (AbstractSalesforceProcessor.getParameter() reads the header first and uses the endpoint configuration only as a fallback). The control-header constants in SalesforceEndpointConfig (for example SOBJECT_QUERY = sObjectQuery, SOBJECT_SEARCH = sObjectSearch, SOBJECT_NAME = sObjectName, SOBJECT_ID = sObjectId, APEX_URL = apexUrl, APEX_METHOD = apexMethod, and the apexQueryParam. prefix) used plain, non-Camel-prefixed values. Because these names do not start with the Camel / camel prefix, HttpHeaderFilterStrategy - which blocks only the Camel header namespace on the HTTP boundary - let them pass from an inbound HTTP request straight into the Exchange. In a route that bridges an HTTP consumer (for example platform-http) into a salesforce: producer, any HTTP client could therefore set these headers and override what the route intended - supplying its own SOQL query or SOSL search to read data from any SObject the connected Salesforce user can access, overriding the target SObject name and id for CRUD operations, or redirecting an Apex REST call to a different endpoint and HTTP method (including destructive methods) with injected query parameters. All such operations run with the full permissions of the Salesforce connected (integration) user, which is typically broad. No credentials are required from the attacker when the bridging consumer is unauthenticated.
This issue affects Apache Camel: from 4.0.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0.
Users are recommended to upgrade to version 4.21.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.8. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.3. After upgrading, routes that set Salesforce operation parameters via the raw header names must use the CamelSalesforce* names (for example CamelSalesforceSObjectQuery and CamelSalesforceApexUrl) instead of the old sObject* / apex* values; the endpoint-option spelling is unchanged. For deployments that cannot upgrade immediately, strip the Salesforce control headers from any untrusted ingress before the salesforce: producer (for example removeHeaders('sObject*') and removeHeaders('apex*') at the start of the route), and set the query, SObject and Apex parameters from a trusted source.
📍 영향받는 시스템
Apache Camel: 4.0.0 < 4.14.8, 4.15.0 < 4.18.3, 4.19.0 < 4.21.0
⚔️ 공격 벡터
인증되지 않은 HTTP 클라이언트가 조작된 Salesforce 제어 헤더를 포함하여 요청을 전송함으로써 발생
🛡️ 대응 방법
Apache Camel을 4.21.0, 4.14.8 또는 4.18.3 이상 버전으로 업그레이드하고, 헤더 사용 시 CamelSalesforce* 접두사를 사용하도록 수정
🔧 검증 코드
출력된 결과에서 사용 중인 camel-salesforce의 버전이 취약한 버전 범위에 포함되는지 확인
mvn dependency:tree | grep 'camel-salesforce'