🇰🇷 한글 설명
http-proxy-middleware의 특정 버전에서 multipart/form-data 처리 시 CR/LF 문자를 적절히 중화하지 못하는 취약점이 발견되었습니다. 공격자는 이를 이용해 멀티파트 데이터 내에 새로운 필드를 주입함으로써 게이트웨이와 백엔드 서버 간의 요청 파라미터 불일치를 유발할 수 있습니다.
💡 쉬운 설명
데이터를 전달하는 과정에서 특수 문자를 이용해 가짜 데이터를 끼워 넣을 수 있는 보안 허점이 있습니다. 이로 인해 보안 검사를 통과한 데이터와 실제 서버가 받는 데이터가 달라져 공격에 악용될 수 있습니다.
🇺🇸 원문 (English)
http-proxy-middleware is node.js http-proxy middleware. From 3.0.4 until 3.0.7 and 4.1.1, fixRequestBody() is the library's documented helper for re-emitting a request body that was already consumed by a body parser. When the outgoing Content-Type is multipart/form-data, it rebuilds the body with handlerFormDataBodyData(), which interpolates each req.body key and value directly into the multipart wire format without neutralizing CR/LF. A \r\n inside a value (or key) lets an attacker close the current part and inject an entirely new form part. Because the proxy's own body parser saw a single opaque value, any gateway-side policy or validation performed on req.body is evaluated against a different set of fields than the upstream backend ultimately parses a request/parameter desynchronization across the trust boundary. This vulnerability is fixed in 3.0.7 and 4.1.1.
📍 영향받는 시스템
http-proxy-middleware 3.0.4 ~ 3.0.7 및 4.1.1 미만 버전
⚔️ 공격 벡터
multipart/form-data의 키 또는 값에 CR/LF(
)를 삽입하여 새로운 폼 파트를 주입하는 방식
🛡️ 대응 방법
http-proxy-middleware를 3.0.7 또는 4.1.1 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전이 3.0.7 미만이거나 4.1.1 미만인지 확인
npm list http-proxy-middleware