# CVE-2023-52314: PaddlePaddle command injection in convert_shape_compare

Source: https://junglewise.ai/threats/cve-2023-52314-paddlepaddle-command-injection-in-convert-shape-compare  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-01-03. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2023-52314 · Severity: low · CVSS 3.1 · Published 2024-01-03

PaddlePaddle is a popular open-source deep learning framework used to build and train machine learning models. A command injection vulnerability in its convert_shape_compare component allowed attackers to execute arbitrary operating system commands. This could lead to complete system compromise, data theft, or malware installation on any machine using an affected version of PaddlePaddle.

Technologies: [PaddlePaddle Paddle](https://junglewise.ai/threats/technologies/paddle), [paddlepaddle (PyPI)](https://junglewise.ai/threats/technologies/paddlepaddle). Vendors: [PaddlePaddle](https://junglewise.ai/threats/vendors/paddlepaddle), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2023-52314 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2023-52314 being exploited in the wild.

**How severe is CVE-2023-52314?** Low severity, with a CVSS score of 3.1, published 3 January 2024.

**Which products and versions are affected?** PaddlePaddle Paddle before 2.6.0; paddlepaddle (PyPI) ECOSYSTEM:introduced=0,fixed=2.6.0.

**Is there a fix for CVE-2023-52314?** Yes. paddlepaddle (PyPI): upgrade to 2.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2023-52314 attacked?** It is attacked over the network.

**Am I affected by CVE-2023-52314?** Check whether you run PaddlePaddle Paddle or paddlepaddle (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- paddlepaddle (PyPI): upgrade to 2.6.0 or later

  ```sh
  pip install "paddlepaddle>=2.6.0"
  ```


## Technical details

The vulnerability is a command injection (CWE-78) in the convert_shape_compare function within PaddlePaddle's dynamic-to-static (Dy2St) conversion module. The flaw stems from improper input sanitization when constructing or executing system commands. An attacker with the ability to supply crafted input to the Dy2St conversion process could inject shell metacharacters to break out of the intended command context and execute arbitrary commands with the privileges of the process running PaddlePaddle. The vulnerability affects all versions prior to 2.6.0 and was patched in commit 5ed9478fdef96a06eeec9093f9e768c97b094af3 by removing the vulnerable function from the public API.

## Affected products

- PaddlePaddle Paddle before 2.6.0

## Identifiers

- CVE-2023-52314
- GHSA-3cr5-2446-8pg3
- PYSEC-2024-146

## Timeline

- 2024-01-03: disclosed: Published in GitHub Advisory Database
- 2023-12-18: patched: Patch released in version 2.6.0

## References

- [https://github.com/PaddlePaddle/Paddle/commit/5ed9478fdef96a06eeec9093f9e768c97b094af3](https://github.com/PaddlePaddle/Paddle/commit/5ed9478fdef96a06eeec9093f9e768c97b094af3)

## Related threats

- [PYSEC-2026-1755 - PaddlePaddle allows arbitrary file read via paddle.vision.ops.read_file](https://junglewise.ai/threats/cve-2024-1603-paddlepaddle-allows-arbitrary-file-read-via-paddle-vision-ops-read)
- [PYSEC-2026-1756 - PaddlePaddle command injection in paddle.utils.download._wget_download](https://junglewise.ai/threats/cve-2024-0815-paddlepaddle-command-injection-in-paddle-utils-download-wget)
- [PYSEC-2026-1754 - PaddlePaddle command injection vulnerability](https://junglewise.ai/threats/cve-2024-0817-paddlepaddle-command-injection-vulnerability)
- [PYSEC-2026-444 - Code Injection in paddlepaddle](https://junglewise.ai/threats/cve-2024-0521-code-injection-in-paddlepaddle)
- [PYSEC-2026-442 - PaddlePaddle Path Traversal vulnerability](https://junglewise.ai/threats/cve-2024-0818-paddlepaddle-arbitrary-file-overwrite-via-path-traversal)
