🔍 CVE-2025-12999

0.0
CVSS Score
UNKNOWN
2026-09-21
2026-10-14 13:10
✅ 완료

🇰🇷 한글 설명

UrlUtil.getBaseUrl 함수가 신뢰할 수 없는 프록시로부터 전달된 X-Forwarded-Host 등의 헤더를 검증 없이 사용하여 절대 URL을 생성하는 취약점입니다. 공격자가 조작된 헤더를 보내 캐시를 오염시키면, 다른 모든 클라이언트가 공격자가 지정한 악성 VSIX 파일과 서명을 다운로드하게 됩니다.

💡 쉬운 설명

공격자가 가짜 주소 정보를 서버에 저장시켜, 다른 사용자들이 정상적인 확장 프로그램 대신 해킹용 프로그램을 다운로드하게 만드는 공격입니다. 서버가 사용자의 요청을 제대로 검증하지 않고 잘못된 주소를 캐시에 저장하기 때문에 발생합니다.

🇺🇸 원문 (English)

UrlUtil.getBaseUrl builds the absolute URLs in a response — download links, icons, asset and API URLs — from the X-Forwarded-Host, X-Forwarded-Proto and X-Forwarded-Prefix request headers, with no check on whether the sender was a trusted proxy, falling back to the client-supplied Host header. Those responses are cached under keys that do not include the host (extension.json since 0.6.0, namespace.details.json since 0.9.0, sitemap since 0.14.5, latest.extension.version.vscode since 0.34.2). A single request carrying a forged header therefore places attacker-chosen URLs into an entry served to every other client for the lifetime of that entry — one hour by default, and cluster-wide where ovsx.redis.enabled is set. The VSIX download URL, its signature URL and the public key URL are all derived from the same base URL, so extension signing does not limit the impact: an attacker who poisons an entry supplies the package, the signature over it, and the key used to verify it. Exploitability depends on deployment topology. A server reachable directly by clients, or fronted by a proxy that relays the client's X-Forwarded-Host rather than overwriting it, is exploitable by an unauthenticated remote attacker. A proxy that overwrites the header is not. An unauthenticated attacker can poison Open VSX's per-extension metadata cache with attacker-controlled download, signature, and public-key URLs by supplying a crafted X-Forwarded-Host header, causing downstream VS Code-compatible editors to fetch and install a malicious VSIX. Workarounds (unpatched versions) 1. Configure the reverse proxy to set rather than relay X-Forwarded-Host, X-Forwarded-Proto and X-Forwarded-Prefix — note that nginx's $host is the client's Host header and is not a safe value. 2. Ensure the server is not reachable except through that proxy. 3. Flush the caches afterwards; poisoned entries survive the configuration change.

📍 영향받는 시스템

Open VSX (extension.json 0.6.0+, namespace.details.json 0.9.0+, sitemap 0.14.5+, latest.extension.version.vscode 0.34.2+ 버전 포함)

⚔️ 공격 벡터

조작된 X-Forwarded-Host 헤더를 포함한 요청을 보내 서버의 메타데이터 캐시를 오염시키는 방식

🛡️ 대응 방법

리버스 프록시가 X-Forwarded 헤더를 전달(relay)하지 않고 직접 설정(set)하도록 구성하고, 기존 캐시를 모두 삭제해야 함

🔧 검증 코드

응답 헤더나 결과값에 공격자가 설정한 'attacker.com'과 같은 임의의 호스트 주소가 포함되어 있다면 취약한 상태임

Shell / Script
curl -I -H 'X-Forwarded-Host: attacker.com' https://your-open-vsx-server.com/extension/some-ext/metadata | grep -i 'Location'

💻 영향받는 소프트웨어

Nginx