| Titel | ONNX ONNXMLTools 1.16.0 (latest release) and master commit cf608be4 Cross Site Scripting |
|---|
| Beschreibung | 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 ModelProto.producer_name (a protobuf string field of a crafted .onnx model) leads to cross-site scripting / HTML 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 / visualize_model() — model_info concatenation lines 87-93, <h2>[model_info]</h2> template line 104, unescaped str.replace line 149
- Vulnerable parameter: ModelProto.producer_name / producer_version 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 validation; visualize_model() substitutes producer_name raw into the <h2> heading of the generated HTML page, so a producer name containing <img onerror=...> becomes live DOM and both event handlers execute when the page renders. Verified in a real browser: document.title rewrite, data-e2e-control attribute set on the document element, and two injected <img> elements inside the heading; a control model differing only in the producer_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 (attacker-controlled heading and 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-22
- Vendor notified: [pending]
- Patch released: [pending]
- Public disclosure: [pending]
Countermeasure
Treat the heading as text: HTML-escape producer_name and producer_version (html.escape) before substituting into the template, or build the heading via DOM textContent; encode the graph node names used in the same template's inline script as data as well, and add a regression test with markup-bearing producer names. |
|---|
| Quelle | ⚠️ https://github.com/onnx/onnxmltools/issues/816 |
|---|
| Benutzer | Dem000000 (UID 98564) |
|---|
| Einreichung | 29.10.2026 13:55 (vor 28 Tagen) |
|---|
| Moderieren | 26.11.2026 18:42 (28 days later) |
|---|
| Status | Akzeptiert |
|---|
| VulDB Eintrag | 444608 [ONNX ONNXMLTools bis 1.16.0 visualize.py visualize_model producer_name Cross Site Scripting] |
|---|
| Punkte | 20 |
|---|