{"id":"CVE-2024-49048","aliases":["GHSA-ghq9-vc6f-8qjf","PYSEC-2024-204"],"url":"https://o3.security/vulnerability/CVE-2024-49048","summary":"TorchGeo Remote Code Execution Vulnerability","details":"### Impact\n\nTorchGeo 0.4–0.6.0 used an [`eval`](https://docs.python.org/3/library/functions.html#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()`](https://torchgeo.readthedocs.io/en/v0.6.0/api/models.html#torchgeo.models.get_weight) or [`torchgeo.trainers`](https://torchgeo.readthedocs.io/en/v0.6.0/api/trainers.html) as an external API could be affected.\n\n### Patches\n\nThe `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.\n\n### Workarounds\n\nIn unpatched versions, input validation and sanitization can be used to avoid this vulnerability.\n\n### References\n\n#### Bug history\n\n* Introduced: https://github.com/torchgeo/torchgeo/pull/917\n* Patched: https://github.com/torchgeo/torchgeo/pull/2323\n* Released: [v0.6.1](https://github.com/microsoft/torchgeo/releases/tag/v0.6.1)","published":"2024-11-12T18:15:45.353Z","modified":"2026-10-24T10:30:15.705623636Z","cvss":{"score":8.1,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"torchgeo","fixedVersion":"0.6.1"}],"fix":{"url":"https://github.com/torchgeo/torchgeo/pull/2323","label":"torchgeo/torchgeo#2323"},"references":[{"type":"FIX","url":"https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-49048"},{"type":"WEB","url":"https://github.com/torchgeo/torchgeo/security/advisories/GHSA-ghq9-vc6f-8qjf"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-49048"},{"type":"WEB","url":"https://github.com/torchgeo/torchgeo/pull/2323"},{"type":"WEB","url":"https://github.com/torchgeo/torchgeo/pull/917"},{"type":"WEB","url":"https://github.com/torchgeo/torchgeo/commit/1a980788cb7089a1115f3b786c7daa9dd47d7d7a"},{"type":"WEB","url":"https://github.com/microsoft/torchgeo/releases/tag/v0.6.1"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/torchgeo/PYSEC-2024-204.yaml"},{"type":"PACKAGE","url":"https://github.com/torchgeo/torchgeo"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-24T10:30:15.705623636Z"}}