Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2024-49048

TorchGeo Remote Code Execution Vulnerability
Back to all
CVE

CVE-2024-49048

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

  • Introduced: https://github.com/torchgeo/torchgeo/pull/917
  • Patched: https://github.com/torchgeo/torchgeo/pull/2323
  • Released: v0.6.1

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
8.1
-
3.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
8.1
-
3.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Related Resources

No items found.

References

https://github.com/torchgeo/torchgeo/security/advisories/GHSA-ghq9-vc6f-8qjf, https://nvd.nist.gov/vuln/detail/CVE-2024-49048, https://github.com/torchgeo/torchgeo/pull/2323, https://github.com/torchgeo/torchgeo/pull/917, https://github.com/torchgeo/torchgeo/commit/1a980788cb7089a1115f3b786c7daa9dd47d7d7a, https://github.com/microsoft/torchgeo/releases/tag/v0.6.1, https://github.com/pypa/advisory-database/tree/main/vulns/torchgeo/PYSEC-2024-204.yaml, https://github.com/torchgeo/torchgeo, https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-49048

Severity

8.1

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
8.1
EPSS Probability
0.00645%
EPSS Percentile
0.7117%
Introduced Version
0.4,0.4.0
Fix Available
0.6.1

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading