🇰🇷 한글 설명
Guzzle Services 라이브러리의 1.5.4 미만 버전은 XML 요청 직렬화 시 값에 포함된 CDATA 종결자 `]]>`를 안전하게 처리하지 않습니다. 공격자가 제어하는 입력에 이 문자열이 포함되면 CDATA 섹션이 조기에 닫히고 나머지가 XML 마크업으로 해석되어 의도하지 않은 요소가 전송될 수 있습니다.
💡 쉬운 설명
외부 요청 본문을 만들 때 사용자 입력 일부가 XML 구조를 깨뜨려, 원래 의도와 다른 데이터가 함께 전송될 수 있습니다. 응답을 파싱하는 경우에는 영향이 없습니다.
🇺🇸 원문 (English)
Guzzle Services provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures. Versions prior ro 1.5.4 do not safely serialize scalar XML element values containing the CDATA terminator `]]>`. The XML request serializer writes values containing `<`, `>`, or `&` with `XMLWriter::writeCData($value)`. If attacker-controlled input contains `]]>`, the CDATA section closes early and the remainder is interpreted as XML markup. This is an outgoing request-body integrity issue, not a response parsing issue. The attacker does not need to control the service description or schema. Users are affected when all of the following are true: the application uses `guzzlehttp/guzzle-services` to serialize outgoing requests; a request parameter or `additionalParameters` schema uses `location: xml`; the value is serialized as XML element text, not an XML attribute; the value can contain attacker-controlled, user-controlled, tenant-controlled, or otherwise untrusted input; the value is not constrained by a safe `enum`, `pattern`, or custom filter that excludes `]]>`; and the downstream service parses the generated XML structurally and may act on unexpected, duplicated, or injected elements. Applications that serialize untrusted input into `location: xml` request parameters can emit XML containing attacker-controlled elements outside the intended text node. Depending on the receiving service, this can alter operation semantics, smuggle privileged fields, bypass modeled parameter boundaries, or create conflicting duplicated elements. Fixed service descriptions are sufficient if they contain an XML element parameter populated from attacker-controlled input. Users are not directly affected if they only use Guzzle Services to deserialize HTTP response bodies. Response XML parsing uses the response XML location visitor and does not invoke the vulnerable request XML serializer. Response bodies matter only in a second-order flow, such as parsing attacker-controlled response XML, storing or forwarding a parsed string value, and later using it as a `location: xml` request parameter. The issue is patched in `1.5.3` and later by safely splitting embedded CDATA terminators before serialization. The fix preserves the original scalar value as XML text and prevents injected nodes. As a workaround, constrain attacker-controlled XML element values with a strict `enum`, `pattern`, or custom filter that excludes `]]>`, or avoid serializing untrusted data into `location: xml` element text until patched. Where appropriate for the service schema, XML attributes are not affected because they are written with XMLWriter attribute APIs rather than CDATA sections. To determine whether action is needed, search service descriptions for request parameters using `location: xml`, including operation `parameters` and `additionalParameters`. Response-only `models` are not directly affected unless parsed values are reused for request serialization. For object and array parameters, review nested scalar properties because leaf element values can still be affected.
📍 영향받는 시스템
guzzlehttp/guzzle-services 1.5.3 미만 버전을 사용하며 location: xml 요청 파라미터에 신뢰할 수 없는 입력을 직렬화하는 애플리케이션
⚔️ 공격 벡터
공격자가 location: xml 요소 값에 `]]>`를 포함한 입력을 전달하면 CDATA가 조기 종료되고 추가 XML 노드가 주입되어 수신 서비스의 동작이 변조될 수 있습니다.
🛡️ 대응 방법
guzzlehttp/guzzle-services를 1.5.3 이상(권장 1.5.4 이상)으로 업그레이드하고, 패치 전에는 해당 값에 enum/pattern 제약을 두어 `]]>`를 차단하세요.
🔧 검증 코드
출력된 버전이 1.5.3 미만이면 취약하므로 업그레이드가 필요하고, 1.5.3 이상이면 패치가 적용된 상태입니다.
composer show guzzlehttp/guzzle-services 2>/dev/null | grep -E '^versions'