Descrizione
The targets R package before 1.12.1 contains a code execution vulnerability that allows attackers to run arbitrary R code by planting format functions in the data store metadata file. Attackers can supply a crafted _targets data store whose custom format or CAS repository functions are passed to eval(parse()), executing code when victims call tar_read(), tar_load() or tar_workspace().
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.8.
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:
- Bloccare l'accesso esterno al componente, applicare regole WAF per payload di code/template injection e monitorare l'esecuzione di processi figli.
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/ropensci/targets/blob/1.12.0/R/class_store_format_custom.R
- Riferimentohttps://github.com/ropensci/targets/blob/1.12.0/R/class_store_repository_cas.R
- Riferimentohttps://github.com/ropensci/targets/commit/a9681eb237500c7e9a0814cfde31bd05c53d934f
- Riferimentohttps://github.com/ropensci/targets/issues/1602
- Riferimentohttps://github.com/ropensci/targets/releases/tag/1.12.1
- Riferimentohttps://www.vulncheck.com/advisories/targets-r-package-before-1.12.1-code-execution-via-custom-storage-metadata
- Riferimentohttps://github.com/ropensci/targets/issues/1602