CVE-2026-10801: ModelScope ms-swift Weak Hash in PIL Image Cache Key Handler

CVE-2026-10801 · Severity: low · CVSS 3.6 · Published 2026-06-04

Modelscope ms-swift, a framework for fine-tuning large models, contains a flaw in how it caches images during training and inference. Because the software does not include image dimensions when creating a unique ID (hash) for cached images, two different images with the same raw data but different shapes can be confused for one another. This could lead to a model processing the wrong image, potentially causing incorrect results or data integrity issues during sensitive AI operations.

Technologies: ms-swift (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-10801 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-10801 being exploited in the wild.
How severe is CVE-2026-10801?
Low severity, with a CVSS score of 3.6, published 4 June 2026.
Which products and versions are affected?
ms-swift (PyPI) <= 4.2.0, ECOSYSTEM:introduced=0,last_affected=4.2.0.
Is there a fix for CVE-2026-10801?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-10801 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-10801?
Check whether you run ms-swift (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A vulnerability exists in the `Template._save_pil_image` function within `swift/template/base.py` of modelscope ms-swift through version 4.2.0. The implementation uses `SHA256(image.tobytes())` to generate cache keys; however, the `tobytes()` method in the PIL library only returns flattened pixel data, excluding metadata such as width, height, and mode. An attacker with local access could potentially engineer images that result in hash collisions, causing the application to retrieve the wrong image from the cache. This impacts the integrity of multimodal inference and training. A fix involving the inclusion of image dimensions and mode in the hash input has been proposed in pull request #9359.

Affected products

  • modelscope ms-swift <= 4.2.0

Identifiers

  • CVE-2026-10801
  • GHSA-prfw-69r3-wqxf
  • PYSEC-2026-3488

Timeline

  • 2026-05-16: disclosed: Issue and pull request opened on GitHub
  • 2026-06-04: advisory: Published to GitHub Advisory Database and NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.