Skip to content
SSRF Disclosed report Intermediate

SSRF In plantuml (on plantuml.pre.gitlab.com)

The PlantUML server at plantuml.pre.gitlab.com allowed an attacker to make the server fetch arbitrary URLs via the !include directive, enabling server-side request forgery. This could let an attacker access internal endpoints and data, though access to cloud instance metadata was blocked during testing.

Dylan Katz Follow

Originally disclosed on HackerOne

  • Fixed in 5 days
  • Paid in 5 days
  • Disclosed after 11 months

Summary by the researcher

A staging server on gitlab supported rendering of PlantUML. I was able to use PlantUML to make internal network requests on this server. While this was not technically in scope, gitlab.com relies on network configuration to mitigate the SSRF risk plantuml presents via the !include function(which allows including remote resources). However, their standard setup instructions did not make it clear that this was a risk, and it is unlikely users configuring self-hosted gitlab instances would know to restrict network access to their PlantUML instance.

The report

NOTE! Thanks for submitting a report! Please replace all the (parenthesized) sections below with the pertinent details. Remember, the more detail you provide, the easier it is for us to triage and respond quickly, so be sure to take your time filling out the report!

Summary

The site https://plantuml.pre.gitlab.com is vulnerable to SSRF. While I haven't spun up an instance to test if gitlab's integration with plantuml is vulnerable to this, it seems feasible that it is, given a few facotrs: #1 The SSRF is due to a feature in plantuml #2 A PlantUML integration exists for gitlab community edition #3 Due to conversation in gitlab (https://gitlab.com/gitlab-org/release/framework/issues/448, https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/2163/) I believe this is a staging server for plantuml

Steps to reproduce

(Step-by-step guide to reproduce the issue, including:)

  1. Visit the following link:

https://plantuml.pre.gitlab.com/uml/Aov9B2hXKW02AvTyXUByt5I5ufBIj3Hhi9XYPbvoJcbAga96IKc1bRw-eP6vdW4G6bfP65WOS1MNv1TO0m00 2. Note that the UML of the website is included

Note: It seems that while I was testing, access to instance metadata (169.254.169.254) was blocked (or limited), as the server now returns an error after timing out for the following uml, where previously it returned information:

@startuml
start
    :Do some stuff;
    !include http://169.254.169.254/
stop;
@enduml

Impact

This allows attackers to access internal endpoints and data. Additionally, had the instance metadata not been restricted, accessing that information would be feasible. Additionally, this will likely allow for bypassing of the block of /proxy mentioned in this issue: https://gitlab.com/gitlab-org/release/framework/issues/457

What is the current bug behavior?

The plantuml server returns data from internal addresses: https://plantuml.pre.gitlab.com/png/Aov9B2hXKW02AvTyXUByt5I5ufBIj3Hhi9XYPbvoJcbAga96IKc1bRw-eP6vdW4G6bfP65WOw7CLb-GNM0C0

What is the expected correct behavior?

The plantuml server does not allow link-local network includes via the include statement

Impact

It's difficult to say, but given the default plantuml installation allows for this SSRF, it's likely multiple on-premises installations would open a risk for SSRF once plantuml is enabled. This site also allows for accessing other resources on its network in its current state

The original report as published on HackerOne, by plazmaz. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the PlantUML !include directive fetches remote URLs without restricting access to internal or link-local addresses.

Impact

Attackers could access internal endpoints and data, and potentially bypass the /proxy block, though instance metadata access was blocked or limited during testing.

What the attacker needed

Access to the PlantUML server

The fix

The PlantUML server should not allow link-local network includes via the include statement.

How it was found

  1. Visit the provided link that encodes a UML diagram with a remote include.
  2. Observe that the rendered UML includes content fetched from the remote URL.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Server-side request forgery (SSRF) is when a server is tricked into making requests to internal systems on the attacker's behalf. Here, the PlantUML diagram tool let users include remote content, so an attacker could point it at internal addresses and read the response. This can expose private services that are not meant to be reachable from the internet.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More by Dylan Katz

View all

2 more disclosed reports, best first.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.