🔍 CVE-2022-35948

5.3
CVSS Score
MEDIUM
2022-08-15
2026-06-17 04:52
✅ 완료

🇰🇷 한글 설명

Node.js용 HTTP/1.1 클라이언트인 undici의 특정 버전에서 헤더에 검증되지 않은 입력값을 사용할 경우 CRLF 인젝션 취약점이 발생합니다. 특히 content-type 헤더 내에 제어 문자를 삽입하여 단일 요청을 두 개 이상의 요청으로 분리할 수 있습니다.

💡 쉬운 설명

웹 브라우저가 서버에 명령을 보낼 때, 공격자가 몰래 추가 명령어를 끼워 넣을 수 있는 보안 구멍이 발견되었습니다. 이를 통해 원래 의도하지 않은 다른 요청을 서버에 강제로 보낼 수 있습니다.

🇺🇸 원문 (English)

undici is an HTTP/1.1 client, written from scratch for Node.js.`=< [email protected]` users are vulnerable to _CRLF Injection_ on headers when using unsanitized input as request headers, more specifically, inside the `content-type` header. Example: ``` import { request } from 'undici' const unsanitizedContentTypeInput = 'application/json\r\n\r\nGET /foo2 HTTP/1.1' await request('http://localhost:3000, { method: 'GET', headers: { 'content-type': unsanitizedContentTypeInput }, }) ``` The above snippet will perform two requests in a single `request` API call: 1) `http://localhost:3000/` 2) `http://localhost:3000/foo2` This issue was patched in Undici v5.8.1. Sanitize input when sending content-type headers using user input as a workaround.

📍 영향받는 시스템

undici 버전 5.8.0 이하

⚔️ 공격 벡터

검증되지 않은 사용자 입력값이 HTTP 헤더(특히 content-type)에 포함되어 CRLF( ) 문자를 통해 요청을 분리함

🛡️ 대응 방법

undici 버전을 v5.8.1 이상으로 업데이트하거나, 헤더에 사용되는 입력값을 사전에 검증 및 정제함

🔧 검증 코드

출력된 결과에서 undici의 버전이 5.8.0 이하인지 확인합니다.

Shell / Script
npm list undici | grep undici

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

💻 영향받는 소프트웨어

Node.js