🇰🇷 한글 설명
Ruby/Rack 웹 서버인 Puma에서 언더스코어(_)가 포함된 헤더를 사용하여 프록시가 설정한 헤더(예: X-Forwarded-For)를 덮어쓸 수 있는 취약점이 발견되었습니다. 이로 인해 보안을 위해 프록시 헤더를 신뢰하는 시스템의 무결성이 훼손될 수 있습니다. 최신 버전으로 업데이트하거나 Nginx의 underscores_in_headers 설정을 통해 완화할 수 있습니다.
💡 쉬운 설명
공격자가 이름이 비슷한 가짜 정보를 보내 웹 서버가 프록시가 보낸 진짜 정보를 무시하게 만들 수 있는 문제입니다. 이로 인해 사용자의 실제 IP 주소 등을 속일 수 있어 보안에 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
Puma is a Ruby/Rack web server built for parallelism. In affected versions clients could clobber values set by intermediate proxies (such as X-Forwarded-For) by providing a underscore version of the same header (X-Forwarded_For). Any users relying on proxy set variables is affected. v6.4.3/v5.6.9 now discards any headers using underscores if the non-underscore version also exists. Effectively, allowing the proxy defined headers to always win. Users are advised to upgrade. Nginx has a underscores_in_headers configuration variable to discard these headers at the proxy level as a mitigation. Any users that are implicitly trusting the proxy defined headers for security should immediately cease doing so until upgraded to the fixed versions.
📍 영향받는 시스템
Puma 웹 서버 (v6.4.3 및 v5.6.9 미만 버전)
⚔️ 공격 벡터
표준 헤더와 이름이 유사하지만 언더스코어가 포함된 헤더를 전송하여 프록시 헤더를 무력화함
🛡️ 대응 방법
Puma를 v6.4.3 또는 v5.6.9 이상으로 업그레이드하거나, Nginx에서 underscores_in_headers 설정을 사용하여 언더스코어 헤더를 차단함
🔧 검증 코드
출력된 Puma의 버전을 확인하여 취약한 버전(v6.4.3/v5.6.9 미만)인지 체크함
bundle exec gem list puma