GHSA-ghq9-vc6f-8qjfHighCVSS 8.1

TorchGeo Remote Code Execution Vulnerability

Published
April 1, 2026
Last Modified
April 1, 2026

🔗 CVE IDs covered (1)

📋 Description

Impact

TorchGeo 0.4–0.6.0 used an eval statement in its model weight API that could allow an unauthenticated, remote attacker to execute arbitrary commands. All platforms that expose torchgeo.models.get_weight() or torchgeo.trainers as an external API could be affected.

Patches

The eval statement was replaced with a fixed enum lookup, preventing arbitrary code injection. All users are encouraged to upgrade to TorchGeo 0.6.1 or newer.

Workarounds

In unpatched versions, input validation and sanitization can be used to avoid this vulnerability.

References

Bug history

  • Introduced: https://github.com/torchgeo/torchgeo/pull/917
  • Patched: https://github.com/torchgeo/torchgeo/pull/2323
  • Released: v0.6.1

🎯 Affected products1

  • pip/torchgeo:>= 0.4, <= 0.6.0

🔗 References (9)