Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix(github): validate cloud API subdomain to enhance SSRF protection
Victor Hugo dos Santosbc21d1d8abb3
diff --git a/backend/src/services/app-connection/github/github-connection-fns.ts b/backend/src/services/app-connection/github/github-connection-fns.tsindex 481b4eac88..337700ebf0 100644--- a/backend/src/services/app-connection/github/github-connection-fns.ts+++ b/backend/src/services/app-connection/github/github-connection-fns.ts@@ -43,6 +43,10 @@ export const getGitHubInstanceApiUrl = async (config: {if (config.credentials.instanceType === "server") {apiBase = `${host}/api/v3`;} else {+ // The cloud API lives on a separate subdomain (api.${host}) that resolves+ // independently from the root host, so it must be validated too — otherwise a+ // split-DNS host (root public, api.* internal) bypasses the SSRF guard.+ await blockLocalAndPrivateIpAddresses(`https://api.${host}`);apiBase = `api.${host}`;}