Cloudanix VulnDB

CVE-2022-4973

Medium · 4.9

CVSS

4.9

EPSS

0.4%

Published

Oct 16, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

Users who can write posts might secretly add harmful code that runs for anyone viewing those pages, potentially stealing information or taking over accounts.

Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Low
Impact
Data Tampering
Component
Web Framework
Class
XSS
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Authenticated users with post or page editing privileges can store arbitrary JavaScript in post metadata that executes in browsers whenever the_meta() is invoked on the rendered page.

Why it matters to the business

Attackers with low-privilege accounts can run malicious code in other users' browsers, risking stolen credentials, defacement, or further account compromise across the site.

How an attack unfolds

An attacker obtains an author, contributor, or editor account, crafts a post containing unsanitized script content in custom fields or meta, publishes it, and waits for visitors or administrators to view a page that calls the_meta() so the payload executes.

How to fix it

Upgrade WordPress Core to the latest stable release that resolves the stored XSS issue in the_meta() handling and review all existing posts for suspicious metadata entries.

How to confirm the fix worked

Confirm the installed WordPress version is newer than 6.0.2, scan postmeta tables for unexpected script tags, and test rendering pages that invoke the_meta() with previously saved content.

Typical attack path

  1. Obtain authenticated access with post-editing rights
  2. Create or edit a post and inject script payload into metadata
  3. Publish the post so the_meta() renders the content
  4. Wait for a victim to load the affected page and execute the script

How to detect it

Review web server and WordPress logs for posts containing script or HTML tags saved via the editor, inspect the wp_postmeta table for entries with executable code, and search access logs for requests that trigger the_meta() on pages with recently edited content.

What your security team should do

  • Immediately update all WordPress installations to a patched release
  • Audit user roles and restrict editing privileges to trusted accounts only
  • Implement web application firewall rules to block common XSS patterns in post submissions
  • Monitor for unusual postmeta changes and schedule periodic content integrity checks

The record

WordPress Core, in versions up to 6.0.2, is vulnerable to Authenticated Stored Cross-Site Scripting that can be exploited by users with access to the WordPress post and page editor, typically consisting of Authors, Contributors, and Editors making it possible to inject arbitrary web scripts into posts and pages that execute if the the_meta(); function is called on that page.

Affected packages

Ecosystem Package Introduced Fixed
Bitnami wordpress 0 3.6.2
Bitnami wordpress-multisite 0 3.6.2
Debian:11 wordpress 0 5.7.8+dfsg1-0+deb11u1
Debian:12 wordpress 0 6.0.2+dfsg1-1
Debian:13 wordpress 0 6.0.2+dfsg1-1
Debian:14 wordpress 0 6.0.2+dfsg1-1
Ubuntu:16.04:LTS wordpress 0 No fix
Ubuntu:18.04:LTS wordpress 0 No fix
Ubuntu:20.04:LTS wordpress 0 No fix
Ubuntu:22.04:LTS wordpress 0 No fix
Ubuntu:24.04:LTS wordpress 0 6.4.3+dfsg1-1ubuntu1
Ubuntu:Pro:16.04:LTS wordpress 0 No fix
Ubuntu:Pro:18.04:LTS wordpress 0 No fix
Ubuntu:Pro:20.04:LTS wordpress 0 No fix

Related vulnerabilities