🇰🇷 한글 설명
Lemmy의 특정 버전에서 actix-web의 ConnectionInfo::realip_remote_addr가 X-Forwarded-For 헤더의 첫 번째 값을 클라이언트 주소로 잘못 인식하는 취약점이 발견되었습니다. 공격자는 조작된 IP 주소를 헤더에 포함하여 속도 제한(Rate-limit)을 우회함으로써 계정 생성, 로그인 시도, 스팸 게시물 작성 등을 무제한으로 수행할 수 있습니다.
💡 쉬운 설명
공격자가 자신의 IP 주소를 가짜로 속여서 서버의 차단 시스템을 피해가는 문제입니다. 이를 통해 스팸 계정을 대량으로 만들거나 비밀번호를 무차별적으로 대입해 해킹을 시도할 수 있습니다.
🇺🇸 원문 (English)
Lemmy is a link aggregator and forum for the fediverse. Prior to 0.19.19 and 1.0.0-beta.1, actix-web ConnectionInfo::realip_remote_addr reads the first value of X-Forwarded-For as the client address used by raw_ip_key in crates/utils/src/rate_limit/mod.rs. Lemmy's bundled docker/nginx.conf uses $proxy_add_x_forwarded_for instead of $remote_addr, which appends the real client address to an X-Forwarded-For value supplied by the client. An unauthenticated attacker can therefore place a different spoofed address first on each request and receive a new rate-limit bucket, bypassing limits on POST /api/v4/account/auth/register, POST /api/v4/account/auth/login, POST /api/v4/post, POST /api/v4/comment, GET /api/v4/search, POST /api/v4/image, and POST /api/v4/account/import_settings. This permits excessive account creation, brute-force attempts, spam, scraping, uploads, and repeated imports. This issue is fixed in versions 0.19.19 and 1.0.0-beta.1.
📍 영향받는 시스템
Lemmy 0.19.19 미만 버전 및 1.0.0-beta.1 미만 버전
⚔️ 공격 벡터
HTTP 요청 헤더의 X-Forwarded-For 값을 조작하여 속도 제한 메커니즘을 우회하는 방식
🛡️ 대응 방법
Lemmy를 0.19.19 또는 1.0.0-beta.1 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 0.19.19 또는 1.0.0-beta.1보다 낮은지 확인하십시오.
docker exec <lemmy_container_id> lemmy --version 2>/dev/null || echo 'Check version manually'