Skip to content

feat: add SSRF protection for mod downloads#82

Merged
Fleeym merged 3 commits into
mainfrom
download-link-blacklist
Jul 21, 2026
Merged

feat: add SSRF protection for mod downloads#82
Fleeym merged 3 commits into
mainfrom
download-link-blacklist

Conversation

@Fleeym

@Fleeym Fleeym commented Jul 20, 2026

Copy link
Copy Markdown
Member

Mod download requests were allowed to basically do anything, very bad for security since local addresses could be accessed.

Hole wasn't really that big since it was only doing a GET request, and no data was returned to the caller, but still, better to plug the hole than to keep it.

Changelog:

  • Denies any local IP addresses
  • Validates resolved IP and pins actual DNS query to it
  • Run validation on every redirect (max 10 redirects)
  • add tests for good measure

- Denies any local IP addresses
- Validates resolved IP and pins actual DNS query to it
- Run validation on every redirect (max 10 redirects)
- add tests for good measure
@Fleeym
Fleeym marked this pull request as draft July 20, 2026 20:00
@Fleeym

Fleeym commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

Draft for now, still need to test a little more.

@Fleeym

Fleeym commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Tested, seems good enough

@Fleeym
Fleeym marked this pull request as ready for review July 21, 2026 20:48
- renamed mod_download_http_client to pin_dns_http_client
- added docs for the client and pin_dns::PINNED_ADDR
@Fleeym
Fleeym merged commit 5255ac7 into main Jul 21, 2026
2 checks passed
@Fleeym
Fleeym deleted the download-link-blacklist branch July 21, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant