All reports
High

TorchGeo Remote Code Execution Vulnerability

Affected versions

Version ranges need review.

Affected versions
<0.6.1 || =0.1.0 || =0.1.1 || =0.2.0 || =0.2.1 || =0.3.0 || =0.3.1 || =0.4.0 || =0.4.1 || =0.5.0 || =0.5.1 || =0.5.2 || =0.6.0
Fixed version
0.6.1
Affected versions
>= 0.4, <= 0.6.0
Fixed version
0.6.1

Exploitation

CVE-2024-49048

Probability of exploitation in the next 30 days: 1.24%

FIRST EPSS · 2026-11-24

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

Links

Credits

  • zpbrent
  • calebrob6
  • adamjstewart