{"id":27109,"date":"2026-09-21T20:30:42","date_gmt":"2026-09-21T12:30:42","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2025-12999"},"modified":"2026-09-21T20:30:42","modified_gmt":"2026-09-21T12:30:42","slug":"cve-2025-12999","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2025-12999","title":{"rendered":"CVE-2025-12999 &#8211; UrlUtil.getBaseUrl builds the absolute URLs in a response \u2014 download links, icons, asset a"},"content":{"rendered":"<p>UrlUtil.getBaseUrl builds the absolute URLs in a response \u2014 download links, icons, asset and API URLs \u2014 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.                                                                                   <\/p>\n<p>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 \u2014 one hour by default, and cluster-wide where ovsx.redis.enabled is set.<\/p>\n<p>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.                                                                                    <\/p>\n<p>Exploitability depends on deployment topology. A server reachable directly by clients, or fronted by a proxy that relays the client&#8217;s X-Forwarded-Host rather than overwriting it, is exploitable by an unauthenticated remote attacker. A proxy that overwrites the header is not.<\/p>\n<p>An unauthenticated attacker can poison Open VSX&#8217;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.<\/p>\n<p>Workarounds (unpatched versions)<\/p>\n<p>1. Configure the reverse proxy to set rather than relay X-Forwarded-Host, X-Forwarded-Proto and X-Forwarded-Prefix \u2014 note that nginx&#8217;s $host is the client&#8217;s Host header and is not a safe value.<\/p>\n<p>2. Ensure the server is not reachable except through that proxy.<\/p>\n<p>3. Flush the caches afterwards; poisoned entries survive the configuration change.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UrlUtil.getBaseUrl builds the absolute URLs in a response \u2014 download links, icons, asset and API URLs \u2014 from the X-Forwarded-Host, X-Forwarded-Proto and X-Forwarded-Prefix request headers, with no che<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-27109","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/27109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}