GHSA-4MQG-H5JF-J9M7

GHSA-4MQG-H5JF-J9M7 is a critical-severity security vulnerability in torchserve (pip), affecting versions >= 0.3.0, < 0.8.2. It is fixed in 0.8.2.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

TorchServe Pre-Auth Remote Code Execution

TorchServe release 0.8.2 includes fixes to address the previously listed issue:

https://github.com/pytorch/serve/releases/tag/v0.8.2

Tags for upgraded DLC release
User can use the following new image tags to pull DLCs that ship with patched TorchServe version 0.8.2:
x86 GPU

  • v1.9-pt-ec2-2.0.1-inf-gpu-py310
  • v1.8-pt-sagemaker-2.0.1-inf-gpu-py310

x86 CPU

  • v1.8-pt-ec2-2.0.1-inf-cpu-py310
  • v1.7-pt-sagemaker-2.0.1-inf-cpu-py310

Graviton

  • v1.7-pt-graviton-ec2-2.0.1-inf-cpu-py310
  • v1.5-pt-graviton-sagemaker-2.0.1-inf-cpu-py310

Neuron

  • 1.13.1-neuron-py310-sdk2.13.2-ubuntu20.04
  • 1.13.1-neuronx-py310-sdk2.13.2-ubuntu20.04
  • 1.13.1-neuronx-py310-sdk2.13.2-ubuntu20.04

The full DLC image URI details can be found at: https://github.com/aws/deep-learning-containers/blob/master/available_images.md#available-deep-learning-containers-images

References

https://github.com/pytorch/serve/pull/2523
https://github.com/pytorch/serve/releases/tag/v0.8.2
https://github.com/aws/deep-learning-containers/blob/master/available_images.md#available-deep-learning-containers-images

Credit

We would like to thank Oligo Security for responsibly disclosing this issue and working with us on its resolution.
If you have any questions or comments about this advisory, we ask that you contact AWS/Amazon Security via our vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting)) or directly via email to [email protected]. Please do not create a public GitHub issue.

Impact

Use of Open Source Library potentially exposed to RCE
Issue: Use of a version of the SnakeYAML v1.31 open source library with multiple issues that potentially exposes the user to unsafe deserialization of Java objects. This could allow third parties to execute arbitrary code on the target system. This issue is present in versions 0.3.0 to 0.8.1.
Mitigation: A pull request to address this issue has been merged - https://github.com/pytorch/serve/pull/2523. TorchServe release 0.8.2 includes this fix.

GHSA-4MQG-H5JF-J9M7 has a CVSS score of 9.9 (Critical). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.8.2); upgrading removes the vulnerable code path.

Affected versions

torchserve (>= 0.3.0, < 0.8.2)

Security releases

torchserve → 0.8.2 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade torchserve to 0.8.2 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-4MQG-H5JF-J9M7? GHSA-4MQG-H5JF-J9M7 is a critical-severity security vulnerability in torchserve (pip), affecting versions >= 0.3.0, < 0.8.2. It is fixed in 0.8.2.
  2. How severe is GHSA-4MQG-H5JF-J9M7? GHSA-4MQG-H5JF-J9M7 has a CVSS score of 9.9 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of torchserve are affected by GHSA-4MQG-H5JF-J9M7? torchserve (pip) versions >= 0.3.0, < 0.8.2 is affected.
  4. Is there a fix for GHSA-4MQG-H5JF-J9M7? Yes. GHSA-4MQG-H5JF-J9M7 is fixed in 0.8.2. Upgrade to this version or later.
  5. Is GHSA-4MQG-H5JF-J9M7 exploitable, and should I be worried? Whether GHSA-4MQG-H5JF-J9M7 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-4MQG-H5JF-J9M7 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-4MQG-H5JF-J9M7? Upgrade torchserve to 0.8.2 or later.

Other vulnerabilities in torchserve

Stop the waste.
Protect your environment with Kodem.