CVE-2019-25147

7.2 HIGH

📋 TL;DR

The Pretty Links WordPress plugin up to version 2.1.9 has a stored cross-site scripting vulnerability that allows unauthenticated attackers to inject malicious scripts via IP and referer headers. When users visit pages containing these injected scripts, the scripts execute in their browsers, potentially compromising their accounts or sessions. This affects all WordPress sites using vulnerable versions of the Pretty Links plugin.

💻 Affected Systems

Products:
  • WordPress Pretty Links plugin
Versions: Up to and including 2.1.9
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All WordPress installations with Pretty Links plugin enabled are vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator credentials, take over WordPress sites, install backdoors, or redirect users to malicious sites, leading to complete site compromise and data theft.

🟠

Likely Case

Attackers inject malicious scripts to steal user session cookies, perform actions as logged-in users, or deface website content.

🟢

If Mitigated

With proper web application firewalls and input validation, the risk reduces to minimal, though the vulnerability still exists in the code.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending specially crafted HTTP requests with malicious headers to trigger the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.2.0

Vendor Advisory: https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&new=2108490%40pretty-link%2Ftrunk&old=2078274%40pretty-link%2Ftrunk&sfp_email=&sfph_mail=

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find Pretty Links and click 'Update Now'. 4. Alternatively, download version 2.2.0+ from WordPress plugin repository and manually update.

🔧 Temporary Workarounds

Disable Pretty Links plugin

all

Temporarily disable the vulnerable plugin until patched

wp plugin deactivate pretty-link

Web Application Firewall rule

linux

Block malicious IP and referer headers containing script tags

ModSecurity rule: SecRule REQUEST_HEADERS "(?i:<script.*?>)" "id:1001,phase:1,deny,status:403,msg:'XSS attempt detected'"

🧯 If You Can't Patch

  • Implement strict Content Security Policy headers to prevent script execution from untrusted sources
  • Deploy a web application firewall to filter malicious headers before they reach the application

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin → Plugins → Installed Plugins for Pretty Links version. If version is 2.1.9 or lower, you are vulnerable.

Check Version:

wp plugin list --name=pretty-link --field=version

Verify Fix Applied:

After updating, verify Pretty Links plugin shows version 2.2.0 or higher in WordPress admin panel.

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests with suspicious script tags in IP or referer headers
  • Unusual referer values containing JavaScript code

Network Indicators:

  • HTTP traffic with XSS payloads in headers directed to WordPress sites

SIEM Query:

source="web_logs" AND (http_user_agent CONTAINS "<script" OR http_referer CONTAINS "<script" OR http_x_forwarded_for CONTAINS "<script")

🔗 References

📤 Share & Export