| عنوان | ONNX ONNXMLTools 1.16.0 (latest release) and master commit cf608be4 Cross Site Scripting |
|---|
| الوصف | A vulnerability was found in ONNXMLTools 1.16.0 and master commit cf608be4 and classified as medium 6.1. Affected is the visualize_model component in onnxmltools/utils/visualize.py. The manipulation of the argument graph.input[0].name / graph.output names (protobuf string fields of a crafted .onnx model) leads to cross-site scripting / client-side JavaScript injection. It is possible to launch the attack remotely. User interaction is required because a victim must run the visualization on the attacker-supplied model, which by default auto-opens the generated page in the victim's browser.
Technical Details
- Affected file/function: onnxmltools/utils/visualize.py / get_set_node() lines 9-18, get_nodes() lines 25-34, visualize_model() lines 71-161
- Vulnerable parameter: graph.input/output node.name protobuf string fields (model-supplied)
- Attack vector: Network (crafted model distributed via model hub, download, or email)
- Privileges required: None
- Trigger condition: load_model() parses the model without name validation; get_set_node() concatenates the raw name into the inline <script id="js"> block of the generated HTML page (g.setNode label/class), so a name such as x'});<javascript>;// closes the string literal and call and executes arbitrary JavaScript when the page is opened. Verified in a real browser: document.title rewrite, DOM injection, and onerror handler execution; a control model differing only in the name field shows no injection.
Impact
- Confidentiality: Low (script runs in the visualization page origin; origin data exfiltration; stored XSS against hosted model viewers)
- Integrity: Low (page content manipulation presented to the analyst reviewing the model)
- Availability: None
CVSS v3.1
Score: 6.1 (Medium)
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Timeline
- Discovered: 2026-10-21
- Vendor notified: [pending]
- Patch released: [pending]
- Public disclosure: [pending]
Countermeasure
Encode model-derived strings as data before embedding them in the page: json.dumps() for the JavaScript label argument, escape or drop the class attribute value, HTML-escape producer metadata, and add a regression test using quote-bearing model names. |
|---|
| المصدر | ⚠️ https://github.com/onnx/onnxmltools/issues/815 |
|---|
| المستخدم | Dem000000 (UID 98564) |
|---|
| ارسال | 29/10/2026 01:54 PM (28 أيام منذ) |
|---|
| الاعتدال | 26/11/2026 06:42 PM (28 days later) |
|---|
| الحالة | تمت الموافقة |
|---|
| إدخال VulDB | 444607 [ONNX ONNXMLTools حتى 1.16.0 Model Visualization visualize.py get_set_node البرمجة عبر المواقع] |
|---|
| النقاط | 20 |
|---|