🇰🇷 한글 설명
Fastify 5.12.1 미만 버전에서 루트 프리미티브 값을 대상으로 하는 스키마 검증 우회 취약점이 발견되었습니다. Ajv가 JSON 문자열을 예상된 타입으로 강제 변환하지만, Fastify가 변환된 값을 루트 바디로 교체하지 않아 핸들러가 검증되지 않은 원본 문자열을 그대로 받게 됩니다. 이로 인해 데이터 무결성과 접근 제어 로직이 손상될 수 있습니다.
💡 쉬운 설명
데이터가 올바른 형식인지 검사하는 과정에서 검사기는 통과시켰지만, 실제 프로그램은 검사 전의 잘못된 데이터를 그대로 사용하는 문제입니다. 이로 인해 숫자가 들어와야 할 자리에 이상한 글자가 들어와 시스템 오류나 보안 문제를 일으킬 수 있습니다.
🇺🇸 원문 (English)
fastify is a fast and low overhead web framework for Node.js. Versions of fastify before 5.12.1 are affected by a schema validation bypass when a request body schema targets a root primitive value. When the schema validates a top-level primitive such as an integer, Ajv can coerce a JSON string into the expected type during validation, but Fastify does not replace the root request body with the coerced value, so the route handler receives the original unvalidated string. As a result, a request that should have failed validation can reach application logic with a value that does not satisfy the schema, which can undermine integrity and access-control checks that rely on the validated type. Users should upgrade to fastify 5.12.1, which fixes the mismatch. No known workarounds are available.
📍 영향받는 시스템
Fastify versions before 5.12.1
⚔️ 공격 벡터
스키마가 루트 프리미티브 타입을 요구할 때, 검증을 우회하는 JSON 문자열을 요청 본문에 포함하여 전송
🛡️ 대응 방법
Fastify 버전을 5.12.1 이상으로 업그레이드
🔧 검증 코드
출력된 fastify 버전이 5.12.1 미만인지 확인