mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-19 09:40:12 +00:00
ea7ad67f03c921c69f532662a8bf59e6bcef4037
GHSA-6x26-5727-rrm9: a low-privilege member could point a DDNS webhook at internal or loopback hosts and the dashboard would dial them with the unrestricted utils.HttpClient. Extract the notification SSRF defenses (CIDR blocklist, IP-pin DialContext, SNI preservation, redirect rejection) into reusable helpers in pkg/utils (NewRestrictedHTTPClient / ResolveAllowedHTTPURL / buildRestrictedHTTPClient) and route the DDNS webhook through the same path. Replace the notification inline implementation with a thin wrapper to keep behaviour identical. Side improvements collected by the refactor: - prepareRequest now resolves DNS once and returns the paired client, so the dialer's pinned IP and the validated URL stay in sync (no more double resolution between prepareRequest and SetRecords). - response body is drained and closed. - HttpClient / HttpClientSkipTlsVerify are explicitly tagged unsafe for attacker-controlled URLs. Tests cover: hermetic SNI preservation, redirect rejection, dial pin to the vetted IP, the full blocked-CIDR list at the webhook entry point, and the verifyTLS↔skipVerifyTLS inversion in the notification wrapper. Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
LOGO designed by 熊大 .
:trollface: Nezha Monitoring: Self-hostable, lightweight, servers and websites monitoring and O&M tool.
Supports monitoring system status, HTTP (SSL certificate change, upcoming expiration, expired), TCP, Ping and supports push alerts, run scheduled tasks and web terminal.
>> Telegram Channel: 哪吒监控(中文通知频道)
>> Telegram Group: Nezha Monitoring Global (English Only), 哪吒监控(中文群组)
>> Use Cases | 我们的用户 (Google)
User Guide
Contributing
Translation
Is Nezha not in your language, or the translation is incorrect or incomplete? Get involved in the translations on Hosted Weblate.
Screenshots
| 用户前台 @hamster1963 | 管理后台 @nezhahq |
|---|---|
![]() |
![]() |
| hamster1963/nezha-dash | nezhahq/admin-frontend |
add your theme to service/singleton/frontend-templates.yaml
Contributors
Special Thanks
- IPInfo for providing an accurate GeoIP Database.
Star History
Languages
Go
99.3%
Shell
0.5%
PowerShell
0.2%

