GHSA-94v3-77j7-vm48: Gitea: Internal API HTTP client hardcodes InsecureSkipVerify:true with no config override
Summary
Gitea's internal API HTTP client (modules/private/internal.go) hardcodes
TLSClientConfig.InsecureSkipVerify = true with no configuration override. It is the only
outbound TLS client in the codebase that cannot be made to verify its peer's certificate —
webhook, migrations, MinIO, LDAP, SMTP, Redis and incoming-mail all expose a secure-by-default
SkipVerify toggle, this one does not.
When an operator configures internal communication over HTTPS to a non-loopback target
(LOCAL_ROOT_URL=https://<host>/ in a split-host / multi-pod topology), the gitea serv / gitea hook
subprocess that calls the internal API will accept ANY TLS certificate. An attacker with on-path
position on that internal segment can MITM the connection and capture the static high-privilege
INTERNAL_TOKEN, which is the sole authentication for every /api/internal/* endpoint (server
shutdown/restart, SSH key authorization, git command execution, repo hooks, mail send, runner-token
generation).
Severity is deployment-dependent: High for split-host HTTPS deployments; Low/Informational for the
default single-host / unix-socket / HTTP-loopback deployment, where the call is loopback and not
interceptable without local access (which already exposes the token directly). This report is
rated for the affected configuration and the underlying defense-in-depth defect.
Details
Affected component: modules/private/internal.go
The internal API transport hardcodes certificate-verification bypass:
var internalAPITransport = sync.OnceValue(func() http.RoundTripper {
return &http.Transport{
DialContext: dialContextInternalAPI,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true, // hardcoded, no config gate
ServerName: setting.Domain, // SNI only; NOT used for validation while skip=true
},
}
})
Because InsecureSkipVerify is true, ServerName is used only for SNI and any certificate (any CN,
self-signed) is accepted; there is no accidental safety net.
Verified exploit chain (read against main @ aab9737651,
Details
Original advisory: https://github.com/advisories/GHSA-94v3-77j7-vm48
Referenced CVEs
| CVE | CSIRTS overview | External |
|---|---|---|
| CVE-2026-54481 | coverage & exploitation status | NVD · CVE.org |
Same CVEs, other sources
How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.
- high[NEW] [high] Gitea: Multiple vulnerabilitiescert-bund
More from GitHub Security Advisories
- mediumGHSA-jr6p-8pjj-mfx6: Capsule has an incomplete fix of CVE-2026-22872: TenantResource RawItems and Generators s…2026-07-31
- mediumGHSA-68cj-mvg9-rgm2: Capsule: CapsuleConfiguration NodeMetadata regex fields lack webhook validation, allowing…2026-07-31
- mediumGHSA-ff84-5f28-78qj: re2: Out-of-bounds heap read in `exec`/`test`/`match` via attacker-influenced `lastIndex`…2026-07-31
- mediumGHSA-6hxr-mr5r-9836: re2: Global `String.prototype.match` with an empty-matchable pattern never advances → inf…2026-07-31
- mediumGHSA-x83g-979r-f5fh: Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII2026-07-31