Descrizione
An Improper Neutralization of Data within XPath Expressions ('XPath Injection') vulnerability in J-Web shipped with Juniper Networks Junos OS allows an unauthenticated, network-based attacker to execute remote commands on the target device.
While an administrator is logged into a J-Web session or has previously logged in and subsequently logged out of their J-Web session, the attacker can arbitrarily execute commands on the target device with the other user's credentials. In the worst case, the attacker will have full control over the device.
This issue affects Junos OS:
* All versions before 21.2R3-S8,
* from 21.4 before 21.4R3-S7,
* from 22.2 before 22.2R3-S4,
* from 22.3 before 22.3R3-S3,
* from 22.4 before 22.4R3-S2,
* from 23.2 before 23.2R2,
* from 23.4 before 23.4R1-S1, 23.4R2.
Tipo di vulnerabilità
CWE-643
Improper Neutralization of Data within XPath Expressions
The product uses external input to dynamically construct an XPath expression used to retrieve data from an XML database, but it does not neutralize or incorrectly neutralizes that input.
Impatto sui sistemi
| Ambito | Impatto |
| Controllo degli accessi |
Aggirare i meccanismi di protezione |
| Riservatezza |
Leggere i dati dell’applicazione |
Come si previene
Sviluppo
Use parameterized XPath queries (e.g. using XQuery). This will help ensure separation between data plane and control plane.
Sviluppo
Properly validate user input. Reject data where appropriate, filter where appropriate and escape where appropriate. Make sure input that will be used in XPath queries is safe in that context.
Tutte le 14 CVE di tipo CWE-643, con andamento e prevenzione