VYPR
Moderate severityNVD Advisory· Published Jan 3, 2024· Updated Jun 3, 2025

Null pointer dereference in paddle.crop

CVE-2023-52312

Description

Nullptr dereference in paddle.crop in PaddlePaddle before 2.6.0. This flaw can cause a runtime crash and a denial of service.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Null pointer dereference in PaddlePaddle's paddle.crop function can cause a runtime crash and denial of service.

Vulnerability

Overview

CVE-2023-52312 is a null pointer dereference vulnerability in the paddle.crop function within the PaddlePaddle deep learning framework, affecting versions prior to 2.6.0. The root cause is improper validation of tensor dimensions, which allows an attacker to trigger a null pointer access when the function processes invalid inputs [2][4].

Exploitation

Vector

The vulnerability can be triggered by providing specifically crafted tensor arguments to paddle.crop. The proof of concept shows that passing an empty tensor for offsets and a shape tensor containing negative or zero values (e.g., [-1, 0]) will cause a null pointer dereference [4]. No authentication is required; any user or application that can supply input to a PaddlePaddle model using this function is potentially vulnerable.

Potential

Impact

Successful exploitation leads to a runtime crash, resulting in a denial of service. The impact is limited to availability, as the flaw does not appear to enable arbitrary code execution or data corruption [2][4].

Mitigation

Status

The vulnerability has been patched in commit c074de6911944d5d30d28cc7ce2c7099f1c87bce, and the fix is included in PaddlePaddle version 2.6.0 [4]. Users are advised to upgrade to the latest version to mitigate the risk.

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
PaddlePaddlePyPI
< 2.6.02.6.0

Affected products

2

Patches

1
488a0ddc322b

add args check for crop (#59967)

https://github.com/PaddlePaddle/PaddlewanghuancoderDec 14, 2023via ghsa
1 file changed · +10 0
  • paddle/phi/infermeta/unary.cc+10 0 modified
    @@ -664,6 +664,16 @@ void CropInferMeta(const MetaTensor& x,
                             shape_dims.size(),
                             x_dim.size()));
     
    +  PADDLE_ENFORCE_EQ(
    +      offsets_vec.size(),
    +      x_dim.size(),
    +      errors::InvalidArgument(
    +          "The number of elements (%d) of attribute 'offsets' for "
    +          "CropTensor must be equal to the number of "
    +          "dimensions (%d) of the input.",
    +          offsets_vec.size(),
    +          x_dim.size()));
    +
       if (config.is_runtime) {
         out->share_lod(x);
       }
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.