Skip to content
SSRF Advisory Intermediate CVE-2022-23544CVE-2022-23512

GHSL-2022-132_GHSL-2022-133: Server-Side Request Forgery (SSRF) and Path Injection in Metersphere - CVE-2022-23544, CVE-2022-23512

Metersphere has an SSRF in the /resource/md/get/url endpoint where a user-controlled url parameter is fetched by the server, and a path injection in the /api/testcase/delete/{id} endpoint where a user-controlled id is used to delete arbitrary files. An attacker could make the server request internal resources or delete files on the server.

jorgectf Follow

Originally disclosed on GitHub Security Lab

Metersphere’s IssueProxyResourceController loads a /md/get/url endpoint passing a user-controlled url GET parameter (1) to getMdImageByUrl (2).

jorgectf, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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 application fails to validate user-supplied input: the url parameter is passed directly to a request-making function, and the id parameter is used in a file path without sanitisation.

Impact

The SSRF could lead to server-side request forgery and cross-site scripting, and the path injection could lead to authenticated arbitrary file deletion.

What the attacker needed

For SSRF: none; For file deletion: a non-admin account

How it was found

  1. Log in with a non-administrator account.
  2. Create a file on the server to be deleted.
  3. Send a GET request to /api/testcase/delete/ with a path traversal sequence in the id parameter, including session cookie and CSRF token.
  4. Verify that the file was deleted.

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.

This report describes two security bugs in a software called Metersphere. One bug lets an attacker trick the server into fetching any web address they choose, which could be used to access internal systems or run malicious code in a victim's browser. The other bug lets a logged-in user delete any file on the server by manipulating a file path.

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 jorgectf

View all

34 more disclosed reports, best first.

More from GitHub Security Lab

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.