Skip to content
SSRF Disclosed report Intermediate

[nextcloud/mail] Blind SSRF to Internal Network via "List-Unsubscribe" SMTP Header when allow_local_remote_servers is allowed

The researcher found that Nextcloud Mail could be made to send requests to internal hosts via the List-Unsubscribe SMTP header when the developer flag allow_local_remote_servers was enabled. The vendor considered this a non-issue because the flag is intended for local testing and production servers should not enable it.

lauritz Follow

Originally disclosed on HackerOne

Medium 4.3 View original
  • Triaged in under an hour
  • Disclosed after 12 months

Summary by the program

We consider this a non-issue due to the nature of the developer configuration flag allow_local_remote_servers being here exactly for that case. For developers it's necessary to test with local servers, so when this flag is allowed of course the "internal SSRF" works. If the configuration is not set or set to false as it should be on any production server, no SSRF is possible.

Summary by the researcher

This issue was reported in the course of broader research on the “List-Unsubscribe” SMTP header.

While, in my test environment, the SSRF could be used to target internal hosts, later evaluation led to the conclusion that Nextcloud sufficiently protects against internal SSRF via the "List-Unsubscribe" SMTP header. Still, the approach described in my blog post can be used to forge external requests. Insecure Nextcloud configurations or additional supporting factors may also allow requests to internal networks via this SSRF.

The blog post discussing vulnerabilities in this domain can be found here: https://security.lauritz-holtmann.de/post/xss-ssrf-list-unsubscribe/

The original report as published on HackerOne, by lauritz. 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 application followed URLs from the List-Unsubscribe header without blocking internal addresses, relying on the allow_local_remote_servers flag to prevent that in production.

Impact

The SSRF could reach internal hosts only when allow_local_remote_servers was enabled; with the flag unset or false, no SSRF is possible.

What the attacker needed

Allow_local_remote_servers enabled

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.

SSRF (server-side request forgery) is when an attacker can make a server send requests to places the attacker cannot reach directly, such as internal machines. Here, the mail application could be tricked into fetching a URL from an email header, but only if a special developer setting that allows local servers was turned on. The vendor says that setting should never be on in production, so they did not treat it as a real vulnerability.

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 lauritz

View all

7 more disclosed reports, best first.

More from Nextcloud

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.