CVE-2022-27952

9.8 CRITICAL

📋 TL;DR

CVE-2022-27952 is a critical arbitrary file upload vulnerability in PayloadCMS v0.15.0 that allows attackers to upload malicious SVG files containing embedded code. This enables remote code execution on affected systems. Any organization using the vulnerable version of PayloadCMS is at risk.

💻 Affected Systems

Products:
  • PayloadCMS
Versions: v0.15.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects PayloadCMS v0.15.0; earlier and later versions are not vulnerable. The file upload module must be enabled.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with attacker gaining full control over the server, data exfiltration, ransomware deployment, and lateral movement to other systems.

🟠

Likely Case

Webshell installation leading to persistent backdoor access, data theft, and use of the server for further attacks.

🟢

If Mitigated

Attack blocked at the web application firewall level with no file upload reaching the vulnerable component.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires only a crafted SVG file upload. Public proof-of-concept demonstrates the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v0.15.1 and later

Vendor Advisory: https://github.com/payloadcms/payload/releases/tag/v0.15.1

Restart Required: Yes

Instructions:

1. Backup your PayloadCMS instance. 2. Update to PayloadCMS v0.15.1 or later using npm update. 3. Restart the PayloadCMS service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Disable SVG file uploads

all

Configure PayloadCMS to reject SVG file uploads entirely.

Modify PayloadCMS configuration to remove SVG from allowed file types

Implement file type validation

all

Add server-side validation to check actual file content, not just extensions.

Implement MIME type checking and file signature validation

🧯 If You Can't Patch

  • Implement strict WAF rules to block SVG file uploads
  • Isolate the PayloadCMS instance behind additional security layers

🔍 How to Verify

Check if Vulnerable:

Check if running PayloadCMS v0.15.0 by examining package.json or running 'npm list payload'

Check Version:

npm list payload | grep payload

Verify Fix Applied:

Confirm PayloadCMS version is v0.15.1 or later and test SVG file upload functionality

📡 Detection & Monitoring

Log Indicators:

  • Unusual SVG file uploads
  • Large number of file upload attempts
  • Files with embedded script tags in SVG format

Network Indicators:

  • POST requests to file upload endpoints with SVG content
  • Unusual outbound connections from the PayloadCMS server

SIEM Query:

source="payloadcms" AND (file_upload="*.svg" OR request_uri="/api/upload")

🔗 References

📤 Share & Export