Descrizione
SOCFortress CoPilot focuses on providing a single pane of glass for all your security operations needs. Prior to 0.1.77, `POST /api/scoutsuite/generate-gcp-report` in `backend/app/integrations/scoutsuite/routes/scoutsuite.py` admits admin and analyst users and validates the uploaded content as `GCPScoutSuiteJSON`, but passes raw `file.filename` from the multipart header to `save_file_to_directory` in `backend/app/integrations/scoutsuite/services/scoutsuite.py`. The writer combines this filename with `scoutsuite-report` using `os.path.join` without sanitization or a resolved-path containment check. A traversal filename therefore writes the supplied JSON outside the intended report directory. In the reported root-running backend, the researcher demonstrated root-owned writes outside that directory and into the application source directory. This permits host-file overwrite subject to the accepted JSON-content constraint and can disrupt application operation; the demonstrated primitive does not establish unrestricted executable contents or unconditional cross-tenant confidentiality loss. Version 0.1.77 removes caller-controlled filenames from the affected route; unrestricted-content and direct-code-execution claims require separate curator reconciliation.
Come correggere
Priorità: Alta — pianificare la correzione entro pochi giorni. Motivazione: CVSS 10.0, EPSS 0.6% (percentile 47).
Versioni da aggiornare
Il record non riporta ancora i prodotti e le versioni corrette (analisi NVD in corso). Consultare l'advisory del vendor nei riferimenti.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Filtrare le sequenze di path traversal sul reverse proxy/WAF ed eseguire il servizio con permessi minimi sul filesystem.
- Disabilitare il caricamento di file se non necessario e impedire l'esecuzione di script nelle directory di upload.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Riferimenti
- Riferimentohttps://github.com/socfortress/CoPilot/commit/1881ef8d28bc7f45ffa88d7ba4fcca7302355508
- Riferimentohttps://github.com/socfortress/CoPilot/commit/bfa630b65d554670c7462a32ce6fd4e3cbd0254c
- Riferimentohttps://github.com/socfortress/CoPilot/pull/940
- Riferimentohttps://github.com/socfortress/CoPilot/pull/941
- Riferimentohttps://github.com/socfortress/CoPilot/security/advisories/GHSA-q3g8-3cf7-744f
- Riferimentohttps://github.com/socfortress/CoPilot/tree/v0.1.77
- Riferimentohttps://github.com/socfortress/CoPilot/security/advisories/GHSA-q3g8-3cf7-744f