WordPressCMS

CVE-2022-21662

MEDIUM · 5.4 CVSS v3.1 Published 2022-01-06
Fix available
A fix is available. Upgrade to 5.8.3 or later.
See remediation →
58/100
Remediation priority · Elevated
High EPSS Remotely reachable

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
WordPress is a free and open-source content management system written in PHP and paired with a MariaDB database. Low-privileged authenticated users (like author) in WordPress core are able to execute JavaScript/perform stored XSS attack, which can affect high-privileged users. This has been patched in WordPress version 5.8.3. Older affected versions are also fixed via security release, that go back till 3.7.37. We strongly recommend that you keep auto-updates enabled. There are no known workarounds for this issue.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Stored XSS vulnerability in WordPress core allows low-privileged authenticated users (author role) to inject malicious JavaScript into content that executes when viewed by higher-privileged users (administrators), enabling privilege escalation through cross-site scripting.

MitigationUpdate WordPress to version 5.8.3 or later (or the latest security release for older branches back to 3.7.37). Enable automatic updates to ensure future security patches are applied.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
WordPressCMS
Affected:< 5.8.3
Debian LinuxOperating system
Affected:= 9.0= 10.0= 11.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check installed WordPress version
    Access the WordPress admin dashboard, go to Dashboard > Updates, or check the version by viewing the readme.html file at your WordPress root (look for the 'Version X.X.X' line), or query the wp_options database table for the 'db_version' or 'version' option.
    Affected if The installed version is lower than 5.8.3 (for example, 5.8.2, 5.8.1, 5.8.0, or any version below 5.8.3).
  2. Check Debian package version if using Debian-packaged WordPress
    Run 'dpkg -l | grep wordpress' or 'apt-cache policy wordpress' on the Debian server to see the installed package version.
    Affected if The Debian package version is earlier than the fixed version for your Debian release (check Debian security tracker DSA-5001-1).
  3. Verify presence of low-privilege user accounts
    In WordPress admin, go to Users > All Users and review roles assigned. Check for any accounts with 'Author' role or lower (Contributor, Subscriber).
    Affected if There exist users with Author, Contributor, or Subscriber roles who can create or edit content.
  4. Check for content created by low-privilege users
    In WordPress admin, go to Posts > All Posts (or Pages > All Pages) and filter by author to see content authored by users with Author or lower roles.
    Affected if There are published or pending review posts/pages authored by users with Author or lower privileges that administrators or editors may preview/view.
  5. Verify content filtering settings
    Check if the WordPress installation has plugins or theme settings that allow unfiltered HTML, or if the classic editor is in use which permits raw HTML insertion in post content.
    Affected if Unfiltered HTML is allowed in post content, or no sanitization is applied to content submitted by Author-level users before administrator viewing.

Your environment is affected if the installed WordPress version is below 5.8.3 AND there are low-privilege users (Author role or below) who can create content that will be viewed by higher-privilege users like administrators.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 5.8.3 or later
Fixed in 5.8.3
Interim mitigation

Update WordPress to version 5.8.3 or later (or the latest security release for older branches back to 3.7.37). Enable automatic updates to ensure future security patches are applied.

Recommended fix High confidence

WordPress 5.8.3 or later

  1. 1. Backup the WordPress database and all website files before proceeding
  2. 2. Ensure all plugins and themes are updated to their latest compatible versions
  3. 3. Download WordPress 5.8.3 (or latest stable release) from wordpress.org
  4. 4. Upload the new WordPress files to replace the existing installation, overwriting core files
  5. 5. Run the WordPress database upgrade script if prompted (usually automatic at /wp-admin/upgrade.php)
  6. 6. Verify the WordPress version shows 5.8.3 or later in the admin dashboard under Dashboard > Home > Right side (or Tools > Site Health > Info > WordPress section)
  7. 7. Confirm the site functions correctly (pages load, admin access works, plugins function)
  8. 8. Enable automatic updates if not already enabled (add 'define( 'WP_AUTO_UPDATE_CORE', true );' to wp-config.php if needed)
Caveat WordPress minor version upgrades typically have low risk of breaking changes; ensure plugin/theme compatibility before upgrading production sites

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in WordPress Scoped from the published advisory
  • Consultation2.0 h
  • Implementation1.0 h
  • Testing3.0 h
  • Review / QA1.0 h
7.0 hours of engineering $1,210
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,936.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2022-21662 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2022-21662 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data