torchgeo
Affected
- introduced
0.4, fixed0.6.1(ecosystem)
Fixed versions
0.6.1
Fix
- Fixed version
0.6.1pip install --upgrade torchgeo==0.6.1
Advisory
Also known as: CVE-2024-49048, PYSEC-2024-204
TorchGeo Remote Code Execution Vulnerability
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
High Basis: The source's own band: HIGH
0.4, fixed 0.6.1 (ecosystem)0.6.1
0.6.1pip install --upgrade torchgeo==0.6.1Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0