| Version | Supported | Notes |
|---|---|---|
| 1.5.0 | ✅ | Current release (macOS version: root service zapretifyd, see macos/SECURITY.md) |
| 1.4.5 | ✅ | Supported |
| 1.4.4 | ✅ | Supported |
| 1.4.3 | ✅ | Supported |
| 1.4.2 | ✅ | Supported |
| 1.4.1 | ✅ | Supported |
| 1.4.0 | ✅ | Supported |
| 1.3.4 | ✅ | Supported |
| 1.3.3 | ✅ | Supported |
| 1.3.2 | ✅ | Supported |
| 1.3.1 | ✅ | Process monitoring and migration |
| 1.3.0 | ✅ | Hardened local API security |
| < 1.3.0 | ❌ | Recommended to upgrade |
Zapretify implements defense-in-depth protection for all IPC and local server endpoints:
-
Header-Based Cryptographic Authentication (
X-Zapretify-Token):- At startup, the application generates a cryptographically secure 256-bit random token.
- All
/api/*routes strictly require this token via theX-Zapretify-TokenHTTP header. - Query string token authorization (
?token=...) is rejected for API mutations to prevent token leakage via referrers, web logs, or browser histories. - Tokens are validated using
crypto/subtle.ConstantTimeCompareto eliminate timing side-channel attacks.
-
Strict Host & Origin Validation:
- The HTTP middleware strictly checks the
Hostheader against the bound loopback interface (127.0.0.1:<port>), eliminating DNS rebinding attacks. - The
Originheader is strictly validated. Opaque or sandboxed origins (Origin: null,file://,data:) are rejected with403 Forbidden. - Browser
Sec-Fetch-Sitemetadata is checked; cross-site requests are rejected.
- The HTTP middleware strictly checks the
-
HTTP Verb & Request Hardening:
- State-modifying endpoints (
/api/zapret/start,/api/zapret/stop,/api/zapret/benchmark,/api/config,/api/open-url,/api/zapret/ipset-mode, etc.) strictly enforcePOST. - Request bodies are bounded with
http.MaxBytesReader(1 MB) to prevent denial-of-service memory exhaustion. - JSON payload validation clones active configurations before deserialization, preventing zeroing of non-modified fields.
- State-modifying endpoints (
-
Input Sanitation & Filesystem Protection:
- List and filename parameters are restricted to
.txtfiles located strictly within the designatedlists/directory. - Path traversal sequences (
..,/,\), NTFS Alternate Data Streams (:), and Windows DOS reserved device names (CON,PRN,AUX,NUL,COM1-9,LPT1-9) are rejected. - Strategy identifiers and testing parameters are strictly validated against the internal whitelist and strategy registry before being executed.
- List and filename parameters are restricted to
-
Safe URL & Process Execution:
- URLs requested via
/api/open-urlare parsed and strictly verified against an allowed host whitelist (github.com,telegram.org,t.me) and permitted schemes (http,https,tg). - Browser launches use
windows.ShellExecuteWdirectly without passing raw strings intocmd.exeor PowerShell shells. - Winws child processes are tracked by exact PID. A leftover PID from
winws.pidis terminated only if its full image path is<app>\bin\winws.exe; the stop/start/service/uninstall/installer paths terminate only processes whose image lives in the application's own directory. Globaltaskkill /IM winws.exeis used only by the explicit emergency action (/api/zapret/force-kill, "Reset drivers"), which is documented as affecting other DPI tools too.
- URLs requested via
-
Installer & Uninstaller:
- The installer's local server (it runs elevated) uses the same model as the application: loopback
Hostcheck,Origin/Referer/Sec-Fetch-Sitechecks and a per-run random token in anHttpOnly; SameSite=Strictcookie. - PowerShell is invoked with
-EncodedCommandand fixed scripts; user-supplied values are passed through environment variables only, never concatenated into script text. - The install path must be absolute, not a drive root and not inside the Windows directory; archive entries are checked against path traversal.
config.jsonis not shipped: each installation generates its own random Telegram proxy secret on first start. Upgrades never overwriteconfig.json,lists/*-user.txtorcustom.txt.--uninstallremoves only known application files/folders and the application folder itself only if it is then empty.
- The installer's local server (it runs elevated) uses the same model as the application: loopback
If you discover a security vulnerability in Zapretify, please do not disclose it via a public GitHub issue. Instead:
- Use GitHub Private Vulnerability Reporting under the Security tab of the repository; or
- Contact the maintainers directly via Telegram or email.
We appreciate responsible disclosure and aim to investigate and address confirmed vulnerabilities promptly.