🇰🇷 한글 설명
Fastify 5.12.2에서 5.12.5 버전 사이에서 propertyNames 하위 스키마 내의 enum 또는 const 헤더 이름이 소문자로 변환되지 않는 취약점이 발견되었습니다. 이로 인해 대소문자를 구분하는 헤더 허용/차단 목록이 정상적으로 작동하지 않아, 제한된 헤더가 검증을 우회하여 라우트 핸들러에 도달할 수 있습니다. 이 문제는 Fastify 5.12.6 버전에서 수정되었습니다.
💡 쉬운 설명
웹 서버가 헤더 이름을 검사할 때 대소문자를 제대로 맞추지 못해 발생하는 보안 구멍입니다. 공격자가 대소문자를 섞어 보낸 헤더가 검사 규칙을 통과하여 서버에 잘못된 명령을 전달할 수 있습니다.
🇺🇸 원문 (English)
fastify is a fast and low overhead web framework for Node.js. In versions 5.12.2 through 5.12.5, the routine that lowercases header names declared in a route schema does not lowercase the enum or const header names nested inside a propertyNames subschema. As a result, a header allow-list or deny-list written with canonical (non-lowercase) casing never matches the incoming lowercased header, so a restricted header passes validation and reaches the route handler. An attacker can therefore bypass a case-sensitive header validation rule and smuggle a forbidden header past the schema, affecting the integrity of request handling. The issue is fixed in fastify 5.12.6, and users should upgrade to 5.12.6 or later. There is no workaround other than upgrading, though applications can declare header names in lowercase to avoid the mismatch.
📍 영향받는 시스템
Fastify versions 5.12.2 through 5.12.5
⚔️ 공격 벡터
대소문자가 혼용된 헤더를 전송하여 스키마 검증 로직을 우회하고 금지된 헤더를 주입함
🛡️ 대응 방법
Fastify를 5.12.6 버전 이상으로 업그레이드하거나, 모든 헤더 이름을 소문자로 선언하여 사용함
🔧 검증 코드
명령어 결과에 취약한 버전 범위(5.12.2~5.12.5)가 출력되면 해당 시스템은 취약한 상태입니다.
npm list fastify | grep -E 'fastify@5\.(12\.[2-5])'