topthink/framework: is it safe?

Short answer: Every vulnerability listed here affects version 8.0.4 or earlier. Versions after 8.0.4 are not known to be affected. 1 actively exploited.

Composer topthink/framework has 20 known advisories in the phpwarden feed, 1 actively exploited. Feed 2026.11.23.2, updated 2026-11-23.

20advisories
16critical
1on CISA KEV
14no fix recorded
CVETitleSeverityCVSSAffectedFixed in
CVE-2018-20062 KEVThinkPHP 5: remote code execution through the controller/filter request handling (fixed in the 5.0.23 and 5.1.31 security releases)critical9.8>=5.0.0 and <5.0.23 or >=5.1.0 and <5.1.315.0.23, 5.1.31
CVE-2022-47945ThinkPHP Framework vulnerable to remote code executioncritical9.8<6.0.146.0.14
CVE-2022-33107Deserialization of Untrusted Data in topthink/frameworkcritical9.8<=6.0.12–
CVE-2022-38352ThinkPHP deserialization vulnerabilitycritical9.8<=6.0.13–
CVE-2022-25481Exposure of Resource to Wrong Sphere in ThinkPHP Frameworkhigh7.5<=5.0.24–
CVE-2024-44902ThinkPHP deserialization vulnerabilitycritical9.8>=6.1.3 and <=8.0.4–
CVE-2022-44289Thinkphp has a code logic errorhigh8.8<=5.0.24 or >=5.1 and <=5.1.41–
CVE-2021-36567Deserialization of Untrusted Data in topthink/frameworkcritical9.8<=6.0.8–
CVE-2018-16385ThinkPHP SQL Injection vulnerabilitycritical9.8<5.1.235.1.23
CVE-2021-44892ThinkPHP Remote Code Execution (RCE) vulnerabilityhigh8.8<=3.2.3–
CVE-2021-36564Deserialization of Untrusted Data in topthink/frameworkcritical9.8<6.0.96.0.9
CVE-2021-23592Deserialization of Untrusted Data in topthink/frameworkcritical9.8<6.0.126.0.12
CVE-2018-18546ThinkPHP SQLi Vulnerabilitycritical9.8<=3.2.4–
CVE-2018-17566ThinkPHP SQL injection vulnerabilitycritical9.8=5.1.24–
CVE-2021-44350ThinkPHP5 SQL Injection vulnerabilitycritical9.8>=5.0 and <=5.1.22–
CVE-2018-18529ThinkPHP SQLi Vulnerabilitycritical9.8<=3.2.4–
CVE-2018-18530ThinkPHP SQLi Vulnerabilitycritical9.8<=5.1.25–
CVE-2025-50706ThinkPHP Path Traversal Vulnerabilitycritical0.0<=5.1.41–
CVE-2018-10225thinkphp SQL Injection via the index.php s parametercritical9.8=3.1.3–
CVE-2024-34467ThinkPHP Cross-Site Scripting Vulnerabilitymedium6.1>=8.0.0 and <8.0.4 or >=6.1.0 and <6.1.5 or <6.0.178.0.4, 6.1.5, 6.0.17

Quick answers

Is topthink/framework safe to use?

Every vulnerability listed here affects version 8.0.4 or earlier. Versions after 8.0.4 are not known to be affected.

Is topthink/framework being actively exploited?

Yes. 1 of its 20 known vulnerabilities is on CISA's Known Exploited Vulnerabilities list, meaning attackers are using it now. Update before anything else.

How do I check my own site?

Run `phpwarden deps composer.lock`. phpwarden compares the exact version you have installed with these advisories and lists only the ones that apply, exploited ones first.

Am I affected?

Find out in one command. phpwarden checks your composer.lock against this advisory and 21,000+ others, ranked by real-world exploitation (CISA KEV + EPSS). Free, offline, open data.

# PHP projects (recommended)
composer require --dev phpwarden/phpwarden
# then
vendor/bin/phpwarden deps composer.lock

# or, without Composer
pipx install phpwarden   &&   phpwarden deps composer.lock

Or keep it checked automatically: GitHub Action · pre-commit hook · GitLab CI · Laravel artisan command

Install docs   How findings are ranked
A version is vulnerable when it falls inside an affected range and below the fixed version. phpwarden applies these ranges to the exact versions in your lockfile or install, so you only see what applies to you.

Add this status to your README

phpwarden status badge

Maintainer of this package? The badge updates itself whenever the feed is rebuilt (twice a day). Add ?v=1.2.3 to the image address to show the status of one exact version.

[![phpwarden](https://phpwarden.io/badge/topthink/framework.svg)](https://phpwarden.io/packages/topthink/framework)