CVE-2022-24718

7.6 HIGH

📋 TL;DR

CVE-2022-24718 is a path traversal vulnerability in ssr-pages, an HTML page builder for server-side rendering. When untrusted input is passed to the 'svg' property in the build() function, attackers can read arbitrary files from the server. This affects all applications using ssr-pages versions before 0.1.4.

💻 Affected Systems

Products:
  • ssr-pages
Versions: All versions prior to 0.1.4
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability requires the application to process untrusted input via the 'svg' property in build() function.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server file system compromise, allowing attackers to read sensitive files like configuration files, credentials, and source code, potentially leading to further system compromise.

🟠

Likely Case

Unauthorized file disclosure from the server, potentially exposing sensitive application data, configuration files, or user information.

🟢

If Mitigated

No impact if input validation prevents path traversal sequences or if the application doesn't process untrusted SVG input.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires the application to accept untrusted SVG input, but the vulnerability itself is straightforward path traversal.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.1.4

Vendor Advisory: https://github.com/Finastra/ssr-pages/security/advisories/GHSA-w6cx-qg2q-rvq8

Restart Required: Yes

Instructions:

1. Update ssr-pages to version 0.1.4 or later using npm: npm update ssr-pages
2. Restart the application server
3. Verify the fix by checking the package.json version

🔧 Temporary Workarounds

Input Validation

all

Implement strict input validation to reject any SVG input containing path traversal sequences like '../' or absolute paths.

🧯 If You Can't Patch

  • Implement strict input validation to sanitize SVG input and reject path traversal sequences.
  • Restrict SVG input processing to trusted sources only and implement file access controls.

🔍 How to Verify

Check if Vulnerable:

Check package.json for ssr-pages version. If version is less than 0.1.4, the system is vulnerable.

Check Version:

npm list ssr-pages

Verify Fix Applied:

Verify ssr-pages version is 0.1.4 or higher in package.json and test that path traversal attempts in SVG input are rejected.

📡 Detection & Monitoring

Log Indicators:

  • Failed file access attempts with path traversal patterns in SVG processing
  • Unusual file read operations from web application context

Network Indicators:

  • HTTP requests containing '../' or similar patterns in SVG parameters
  • Unusual file read patterns from application endpoints

SIEM Query:

source="web_server" AND (uri="*svg*" AND (uri="*../*" OR uri="*..\\*" OR uri="*%2e%2e%2f*"))

🔗 References

📤 Share & Export