Cross-site Scripting (XSS)Weakness · CWE-79

CVE-2025-5082

MEDIUM · 6.1 CVSS v3.1 Published 2025-05-28
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
68/100
Remediation priority · Elevated
Remotely reachable No privileges

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
The WP Attachments plugin for WordPress is vulnerable to Reflected Cross-Site Scripting via the ‘attachment_id’ parameter in all versions up to, and including, 5.0.12 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link.

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

The WP Attachments WordPress plugin is vulnerable to reflected Cross-Site Scripting (XSS) via the 'attachment_id' parameter in versions up to 5.0.12. The plugin fails to properly sanitize the input and escape the output, allowing unauthenticated attackers to inject arbitrary JavaScript through a crafted URL that tricks users into clicking a malicious link.

MitigationUpdate the WP Attachments plugin to version 5.0.13 or later which contains the patch. If immediate updating is not feasible, implement a WAF rule to block requests containing malicious patterns in the 'attachment_id' parameter.

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

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
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/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. Locate the WP Attachments plugin installation
    Check the /wp-content/plugins/wp-attachments/ directory for the main plugin file (usually wp-attachments.php) and read its header to find the Version field, or query the WordPress database: SELECT option_value FROM wp_options WHERE option_name = 'wp_attachments_version' OR SELECT plugin_version FROM your_plugins_table;
    Affected if The plugin is installed and the version is 5.0.12 or lower (anything below 5.0.13)
  2. Confirm the plugin is active
    Query the WordPress database: SELECT active FROM wp_options WHERE option_name = 'active_plugins' AND option_value LIKE '%wp-attachments%'; or check via WordPress admin dashboard under Plugins > Installed Plugins
    Affected if The WP Attachments plugin is active in the WordPress installation
  3. Test for the vulnerable parameter exposure
    With the plugin active, attempt to access a page that processes the attachment_id parameter (typically a page that displays or processes attachments), for example: https://yoursite.com/?attachment_id=<script>alert(1)</script> or the specific URL endpoint used by the plugin to handle attachments
    Affected if The page reflects the attachment_id parameter value back into the HTML output without sanitization (the script tag executes or appears in the page source unescaped)
  4. Inspect server-side handling of attachment_id
    Review the plugin source code in wp-attachments.php and related files for the $_GET['attachment_id'] or $_REQUEST['attachment_id'] usage; verify if sanitize_text_field, esc_html, esc_attr, or similar escaping functions are applied before output
    Affected if The code does not sanitize the attachment_id input with functions like sanitize_text_field or escape the output with esc_html/esc_attr before reflecting it in the response

You are affected if the WP Attachments plugin versions 5.0.12 or below are installed AND active on your WordPress site AND the attachment_id parameter is reflected in the page output without proper sanitization and escaping, allowing script injection via crafted URLs.

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
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Update the WP Attachments plugin to version 5.0.13 or later which contains the patch. If immediate updating is not feasible, implement a WAF rule to block requests containing malicious patterns in the 'attachment_id' parameter.

Recommended fix High confidence

WP Attachments version 5.0.13 or latest available version

  1. Navigate to the WordPress admin dashboard
  2. Go to Plugins > Installed Plugins
  3. Find the 'WP Attachments' plugin
  4. Check if the current version is 5.0.12 or lower
  5. If vulnerable, click 'Update Now' to update to the latest version, or manually download the latest version from wordpress.org and upload via Plugins > Add New > Upload Plugin

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

Have this fixed Scoped from the published advisory
  • Consultation1.0 h
  • Implementation2.0 h
  • Testing1.0 h
  • Review / QA1.0 h
5.0 hours of engineering $890
Get help mitigating

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-5082 — 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-2025-5082 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