🇰🇷 한글 설명
@fastify/busboy는 multipart form-data 파서에서 헤더 라인을 구분할 때 CRLF(CR+LF) 시퀀스만 인식하는 취약점이 있습니다. 이로 인해 단독 CR 또는 LF 문자가 포함된 파일명이나 필드명이 그대로 파싱되어 파일 시스템 오염, 로그 위조 또는 헤더 주입 공격에 악용될 수 있습니다.
💡 쉬운 설명
파일을 업로드할 때 파일 이름에 특수 제어 문자를 몰래 섞어 넣을 수 있는 문제입니다. 이 문자를 이용해 시스템 로그를 조작하거나 서버의 파일 저장 경로를 교란할 수 있습니다.
🇺🇸 원문 (English)
@fastify/busboy is a multipart form-data parser for Node.js. Its multipart part-header parser splits header lines only on the two-byte carriage-return line-feed sequence, so a lone carriage return or line feed embedded in a part header is not treated as a line break and is carried verbatim into the parsed Content-Disposition filename and field name handed to the application. An attacker who uploads a file whose filename or field name contains a bare carriage return or line feed can inject control characters into consumers that trust the parser to return clean values, enabling filesystem filename pollution, log forging, or header injection when the value is forwarded to a carriage-return-sensitive sink. All versions of @fastify/busboy up to and including 3.2.1 are affected. The issue is fixed in version 3.2.2, which rejects any header line that still contains a bare carriage return or line feed. Users should upgrade to 3.2.2, and consumers such as @fastify/multipart should bump their @fastify/busboy dependency to pull in the fix.
📍 영향받는 시스템
@fastify/busboy 3.2.1 이하 모든 버전
⚔️ 공격 벡터
조작된 CR 또는 LF 문자가 포함된 파일명이나 필드명을 포함한 multipart form-data 업로드
🛡️ 대응 방법
@fastify/busboy를 3.2.2 버전 이상으로 업그레이드하거나, @fastify/multipart 사용 시 의존성을 업데이트하여 수정된 버전을 반영해야 합니다.
🔧 검증 코드
출력된 버전이 3.2.2 미만이면 취약한 상태이며, 3.2.2 이상이면 안전합니다.