NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

CVE-2024-49048: TorchGeo Remote Code Execution Vulnerability

highCVSS 3.1 8.1GHSA-ghq9-vc6f-8qjf

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.getweight() 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.

Published Apr 1, 2026

Affected packages

torchgeo

Ecosystem
PyPI
Affected
>= 0.4, <= 0.6.0
Fixed in
0.6.1
Check
pip show torchgeo

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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

Credited to zpbrent, calebrob6, adamjstewart.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology