Descrizione
The open-vsx.org deployment returned Access-Control-Allow-Origin reflecting the requesting origin together with Access-Control-Allow-Credentials: true on the authenticated /user/ endpoints. A page on any origin could therefore issue credentialed requests to the service in a logged-in user's browser and read the responses.
This exposed /user (login name, avatar, homepage, tokens URL), /user/tokens, /user/namespaces, /user/extensions, /user/search/{name} and /user/namespace/{name}/members, and — because /user/csrf was readable the same way — allowed the CSRF protection on write endpoints to be defeated. Chaining the two, an attacker page could call /user/token/create and exfiltrate a personal access token carrying publish and delete rights over the victim's namespaces.
The headers were emitted by the CDN/edge layer, not by the application: the Open VSX software sets allowCredentials(true) in exactly one place, against a single exact origin derived from ovsx.webui.url, and defines no CORS mapping on /user/ beyond it. No configuration of the software produces origin reflection with credentials.
Tipo di vulnerabilità
CWE-942
Permissive Cross-domain Security Policy with Untrusted Domains
The product uses a web-client protection mechanism such as a Content Security Policy (CSP) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate.
Impatto sui sistemi
| Ambito | Impatto |
| Riservatezza, Integrità, Disponibilità, Controllo degli accessi |
Eseguire codice o comandi non autorizzati, Aggirare i meccanismi di protezione, Leggere i dati dell’applicazione, Dipende dal contesto |
Come si previene
Architettura e progettazione · Esercizio · Riduzione della superficie di attacco
Define a restrictive Content Security Policy or cross-domain policy file.
Architettura e progettazione · Esercizio · Riduzione della superficie di attacco
Avoid using wildcards in the CSP / cross-domain policy file. Any domain matching the wildcard expression will be implicitly trusted, and can perform two-way interaction with the target server.
Architettura e progettazione · Esercizio · Hardening dell’ambiente
For Flash, modify crossdomain.xml to use meta-policy options such as 'master-only' or 'none' to reduce the possibility of an attacker planting extraneous cross-domain policy files on a server.
Tutte le 97 CVE di tipo CWE-942, con andamento e prevenzione