{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "last_affected": "2.0.2"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "last_affected": "2.0.2"
                  }
                ],
                "source": "DESCRIPTION"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "38fd87601464ec921eacab28315b2d7944f13f07"
            }
          ],
          "repo": "https://github.com/octoprint/octoprint",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139901.json"
  },
  "details": "OctoPrint through 2.0.2 contains a stored cross-site scripting vulnerability that allows attackers to inject HTML by planting unsanitized printer SD file names. Attackers with printer control can send M118 echo commands emitting a crafted file list, executing script when another user deletes the entry and acting with their API permissions.",
  "id": "CVE-2026-139901",
  "modified": "2026-12-01T20:46:01.219451935Z",
  "published": "2026-11-30T16:20:34.430Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139901.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139901"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/octoprint-through-2.0.2-stored-xss-via-sd-file-list-deletion-confirmation"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/OctoPrint/OctoPrint/issues/5508"
    },
    {
      "type": "FIX",
      "url": "https://github.com/OctoPrint/OctoPrint/pull/5509"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/OctoPrint/OctoPrint"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/OctoPrint/OctoPrint/blob/2.0.2/src/octoprint/plugins/serial_connector/serial_comm.py#L3129-L3136"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/OctoPrint/OctoPrint/blob/2.0.2/src/octoprint/static/js/app/helpers.js#L841-L846"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/OctoPrint/OctoPrint/blob/2.0.2/src/octoprint/static/js/app/viewmodels/files.js#L990-L995"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:4.0/AV:A/AC:H/AT:P/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "OctoPrint through 2.0.2 Stored XSS via SD File List Deletion Confirmation"
}