The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-25118

CVE-2021-25118: Yoast SEO Information Disclosure Flaw

CVE-2021-25118 is an information disclosure vulnerability in Yoast SEO WordPress plugin that exposes internal file paths through REST API endpoints. This article covers the technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-25118 Overview

CVE-2021-25118 is an information disclosure vulnerability affecting the Yoast SEO WordPress plugin. The vulnerability exists in versions 16.7 through 17.2, where the plugin improperly exposes the full internal server path of featured images in posts via the wp/v2/posts REST API endpoints. This path disclosure could assist attackers in identifying additional vulnerabilities or aid in exploiting other security weaknesses by revealing sensitive server directory structures.

Critical Impact

Attackers can enumerate internal server paths without authentication, potentially facilitating further attacks by revealing server configuration details and directory structures.

Affected Products

  • Yoast SEO WordPress Plugin versions 16.7 to 17.2
  • WordPress installations using affected Yoast SEO versions
  • Sites with exposed REST API endpoints

Discovery Timeline

  • 2022-02-28 - CVE-2021-25118 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-25118

Vulnerability Analysis

This vulnerability falls under CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor). The Yoast SEO plugin inadvertently discloses internal file system paths when processing featured images through WordPress REST API endpoints. When a user or automated tool queries the wp/v2/posts endpoint, the response includes the complete server-side file path for featured images rather than only the public-facing URL.

This type of information leakage, while not directly exploitable for immediate system compromise, provides reconnaissance data valuable to attackers. Knowledge of internal paths can reveal:

  • Operating system type and directory structure
  • Web server configuration and document root location
  • Plugin installation paths that may contain version information
  • User directory names that could be targeted in other attacks

Root Cause

The root cause lies in improper output sanitization within the Yoast SEO plugin's REST API response handling. When the plugin processes featured image metadata for REST API responses, it fails to filter out the internal server path information before including it in the API response. The plugin should only expose the public URL path, not the underlying filesystem location.

Attack Vector

The vulnerability is exploitable remotely over the network without any authentication or user interaction. An attacker can simply send HTTP requests to the WordPress REST API endpoint wp/v2/posts and parse the JSON response to extract internal path information.

The attack scenario typically involves:

  1. The attacker identifies a WordPress site using Yoast SEO plugin
  2. A request is made to the wp/v2/posts REST endpoint
  3. The JSON response contains featured image data with full internal paths
  4. The attacker extracts path information revealing server directory structure
  5. This information is used to facilitate additional attacks or vulnerability discovery

This reconnaissance data can be combined with other vulnerabilities such as Local File Inclusion (LFI) or path traversal attacks to achieve more significant impact.

Detection Methods for CVE-2021-25118

Indicators of Compromise

  • Unusual volume of requests to wp/v2/posts REST API endpoints
  • Sequential or automated queries targeting post metadata
  • Access logs showing systematic enumeration of REST API responses
  • Requests from suspicious IP addresses or known scanning tools

Detection Strategies

  • Monitor WordPress REST API access logs for anomalous request patterns
  • Implement rate limiting on REST API endpoints to detect enumeration attempts
  • Review web server logs for requests containing wp/v2/posts from unexpected sources
  • Deploy Web Application Firewall (WAF) rules to detect REST API reconnaissance activity

Monitoring Recommendations

  • Enable detailed logging for WordPress REST API requests
  • Set up alerts for high-frequency REST API queries from single IP addresses
  • Monitor for requests that may indicate vulnerability scanning tools
  • Regularly audit plugin versions to ensure vulnerable components are identified

How to Mitigate CVE-2021-25118

Immediate Actions Required

  • Update Yoast SEO plugin to version 17.3 or later immediately
  • Audit WordPress REST API access logs for signs of exploitation
  • Consider temporarily restricting REST API access if immediate patching is not possible
  • Review server configurations to minimize information exposure

Patch Information

Yoast has addressed this vulnerability in versions after 17.2. The fix involves properly sanitizing REST API responses to exclude internal server path information. Detailed information about the code changes can be found in the WordPress Plugin Changeset 2608691. Additional vulnerability details are available in the WPScan Vulnerability Report.

Workarounds

  • Restrict access to WordPress REST API endpoints using server configuration or security plugins
  • Implement IP-based access controls for sensitive REST API endpoints
  • Use a Web Application Firewall to filter and monitor REST API traffic
  • Consider disabling the REST API for unauthenticated users if not required for site functionality
bash
# Example: Restrict REST API access in .htaccess for Apache servers
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/wp-json/wp/v2/posts [NC]
RewriteCond %{REMOTE_ADDR} !^192\.168\.1\. 
RewriteRule .* - [F,L]
</IfModule>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechYoast Seo

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability27.36%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-200
  • Technical References
  • WordPress Changeset Update

  • WPScan Vulnerability Report
  • Related CVEs
  • CVE-2024-4041: Yoast SEO WordPress Plugin XSS Flaw
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English