GHSA-ghq9-vc6f-8qjf

Suggest an improvement
Source
https://github.com/advisories/GHSA-ghq9-vc6f-8qjf
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-ghq9-vc6f-8qjf/GHSA-ghq9-vc6f-8qjf.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-ghq9-vc6f-8qjf
Aliases
Published
2026-04-01T00:03:56Z
Modified
2026-04-01T00:26:15Z
Severity
  • 8.1 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
TorchGeo Remote Code Execution Vulnerability
Details

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

Database specific
{
    "cwe_ids":  [
        "CWE-94",
        "CWE-95"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-04-01T00:03:56Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

PyPI / torchgeo

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0.4
Fixed
0.6.1

Affected versions

0.*
0.4.0
0.4.1
0.5.0
0.5.1
0.5.2
0.6.0

Database specific

last_known_affected_version_range
"<= 0.6.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-ghq9-vc6f-8qjf/GHSA-ghq9-vc6f-8qjf.json"