Descrizione

Improper neutralization of special elements in data query logic (Cypher injection) in the orderBy placeholder handling for custom queries in Neo4j Spring Data Neo4j versions 6.1.0 through 8.0.8 and 8.1.0 through 8.1.2 allows a remote attacker to read database contents via blind reads, write read content into new nodes, or, if APOC and APOC file export are enabled, to write query results to a file in the database's accessible file system via crafted sort order parameters. Exploitation requires an application that passes unvalidated user input as the orderBy value to a custom Cypher query using the placeholder directive.

Testo originale del record CVE (in inglese).

Come correggere

Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 8.2, EPSS 0.6% (percentile 43).

Versioni da aggiornare

  • Neo4j Spring Data Neo4j: vulnerabili le versioni dalla 6.1.0 precedenti alla 8.0.9 → aggiornare alla 8.0.9 o successiva.
  • Neo4j Spring Data Neo4j: vulnerabili le versioni dalla 8.1.0 precedenti alla 8.1.3 → aggiornare alla 8.1.3 o successiva.
  • Neo4j Spring Data Neo4j: versione corretta 8.2.0 (o successiva).

Indicazioni del vendor

Soluzione (testo originale del vendor):

Upgrade Spring Data Neo4j to 8.0.9, 8.1.3, 8.2.0 or later (depending on your release line). The fix restricts functions callable in the orderBy directive to an allow list of built-in (non-APOC) functions; the list must be extended intentionally if other functions are needed.

Workaround (testo originale del vendor):

Validate any user-supplied orderBy value against an allow list of known property names and sort directions before passing it to Spring Data Neo4j. Do not expose the orderBy input to untrusted users without validation.

Mitigazioni temporanee

Da applicare solo se non è possibile aggiornare subito:

  • Ridurre l'esposizione del componente vulnerabile (segmentazione, accesso solo da reti fidate) finché la patch non è applicata.

Verifica

  1. Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
  2. Confrontare la versione installata con quelle indicate sopra.
  3. Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
  4. Ripetere la scansione per confermare la correzione.

Configurazioni interessate

VendorProdottoVersioni vulnerabiliCorretta in
Neo4j Spring Data Neo4j ≥ 6.1.0 < 8.0.9 8.0.9
Neo4j Spring Data Neo4j ≥ 8.1.0 < 8.1.3 8.1.3
Neo4j Spring Data Neo4j — 8.2.0

Riferimenti