Descrizione
Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.5, on JRuby, applications that parse untrusted XML with DTDLOAD, DTDVALID, or NOENT can have the NONET restriction bypassed when an external DTD or entity uses a short-form IPv4 host or uses absolute paths resolved against a network URL. The resolver can treat these identifiers as local and send a network request, potentially enabling server-side request forgery. CRuby and default parse options are not affected. This issue is fixed in version 1.19.5.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 3.7, EPSS 0.4% (percentile 33).
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:
- Applicare filtri sul traffico in uscita del server e bloccare l'accesso agli endpoint di metadati cloud (169.254.169.254).
- Disabilitare la risoluzione di entità esterne (DTD) nel parser XML, se configurabile.
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/sparklemotion/nokogiri/commit/97f41b65f4ee0cac859b87f0b26d2648c4806cb8
- Riferimentohttps://github.com/sparklemotion/nokogiri/commit/e448ca2827a9198644610fb730259e12baacdeac
- Riferimentohttps://github.com/sparklemotion/nokogiri/pull/3752
- Riferimentohttps://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5
- Riferimentohttps://github.com/sparklemotion/nokogiri/security/advisories/GHSA-v995-44v6-5fqm