CVE-2022-38352: ThinkPHP deserialization vulnerability

topthink/framework Updated 02 Oct 2025

Summary

16/09/2022
No i
Critical
9.8

CVE-2022-38352: ThinkPHP deserialization vulnerability. Affects topthink/framework versions < 6.0.13. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

ThinkPHP is a popular PHP framework used for developing web applications. It provides a range of features and components to simplify the development process. The vulnerability affects ThinkPHP version 6.0.13. ThinkPHP utilizes the League\Flysystem\Cached\Storage\Psr6Cache component, which is vulnerable to a deserialization attack. This vulnerability allows attackers to execute arbitrary code by exploiting a flaw in the deserialization process.

Vulnerability Detail

The deserialization vulnerability in ThinkPHP v6.0.13 arises from the insecure handling of user-supplied input in the League\Flysystem\Cached\Storage\Psr6Cache component. Attackers can craft a malicious payload that, when deserialized, can execute arbitrary code on the server. This can lead to various consequences, including remote code execution, data breaches, and unauthorized access to sensitive information. The vulnerability has a severity score of 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can disable or remove the League\Flysystem\Cached\Storage\Psr6Cache component from their ThinkPHP installation. This can be achieved by modifying the application configuration or removing the relevant code that utilizes this component. However, this workaround may impact the functionality of certain features that rely on the component.

Conclusion

ThinkPHP version 6.0.13 is vulnerable to a deserialization vulnerability in the League\Flysystem\Cached\Storage\Psr6Cache component. This vulnerability allows attackers to execute arbitrary code on the server. Users are advised to upgrade their ThinkPHP installation to a version beyond 6.0.13 to mitigate the risk. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for topthink/framework →

Share this vulnerability

FAQ

ThinkPHP is a PHP framework used for web application development. It provides a range of features and components to simplify the development process.

The vulnerability allows attackers to execute arbitrary code on the server, potentially leading to remote code execution, data breaches, and unauthorized access to sensitive information.

To fix the vulnerability, it is recommended to upgrade ThinkPHP to a version beyond 6.0.13, which includes the necessary patch to address the issue.

Yes, a temporary workaround is to disable or remove the League\Flysystem\Cached\Storage\Psr6Cache component from the ThinkPHP installation. However, this may impact certain features that rely on the component.

The vulnerability has a severity score of 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), indicating its critical nature.

Related vulnerabilities

Recent vulnerabilities recorded for topthink/framework.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback