Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-1521 Overview
CVE-2025-1521 is a Server-Side Request Forgery (SSRF) vulnerability in PostHog, an open-source product analytics platform. The flaw exists in the processing of the slack_incoming_webhook parameter within the plugin-server fetch utility. The service fails to validate URIs before accessing resources, allowing an authenticated attacker to coerce the application into contacting arbitrary hosts, including internal services. Successful exploitation can disclose sensitive information and, in certain contexts, execute code in the service account context. The issue was reported through the Zero Day Initiative as ZDI-CAN-25352.
Critical Impact
An authenticated remote attacker can abuse PostHog's webhook fetch logic to reach internal network resources and extract sensitive metadata, credentials, or configuration from otherwise non-routable services.
Affected Products
- PostHog (posthog/posthog) product analytics platform
- PostHog plugin-server component using trackedFetch
- Self-hosted PostHog deployments exposing the Slack webhook integration
Discovery Timeline
- 2025-04-23 - CVE-2025-1521 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-1521
Vulnerability Analysis
The vulnerability is a Server-Side Request Forgery issue classified under [CWE-918]. PostHog accepts user-supplied URLs through the slack_incoming_webhook parameter and passes them to the server-side fetch logic without restricting the destination. Because the fetch runs from the PostHog backend, an attacker-controlled URL can target hosts reachable by the server but not by the attacker.
Attackers can target cloud instance metadata endpoints such as 169.254.169.254, internal admin consoles bound to private ranges, or loopback services. Responses returned to the attacker may contain tokens, service account credentials, or configuration data. According to the vendor advisory, exploitation can escalate to code execution in the context of the service account.
Root Cause
The trackedFetch function in plugin-server/src/utils/fetch.ts did not resolve destination hostnames or filter the resulting IP addresses before issuing outbound HTTP requests. Without a DNS lookup check, requests to hostnames resolving to private, loopback, link-local, or other non-unicast ranges proceeded unrestricted. This design allowed webhook URLs to pivot into the internal network perimeter of the PostHog deployment.
Attack Vector
Exploitation requires an authenticated PostHog account with permission to configure Slack webhook integrations. The attacker supplies a crafted URL as the slack_incoming_webhook value, pointing at an internal resource. When PostHog processes the integration, the server-side fetch retrieves the attacker-chosen URL and returns observable data. Attack complexity is low and no user interaction is required beyond the authenticated attacker triggering the integration.
// Security patch in plugin-server/src/utils/fetch.ts
// fix(plugin-server): trackedFetch lookups (#25398)
import { LookupAddress } from 'dns'
import dns from 'dns/promises'
import http from 'http'
import https from 'https'
import * as ipaddr from 'ipaddr.js'
import net from 'node:net'
import fetch, { type RequestInfo, type RequestInit, type Response, FetchError, Request } from 'node-fetch'
import { URL } from 'url'
import { runInSpan } from '../sentry'
import { isProdEnv } from './env-utils'
const staticLookup: net.LookupFunction = async (hostname, options, cb) => {
let addrinfo: LookupAddress[]
try {
addrinfo = await dns.lookup(hostname, { all: true })
} catch (err) {
cb(new Error('Invalid hostname'), '', 4)
return
}
for (const { address } of addrinfo) {
// Prevent addressing internal services
if (ipaddr.parse(address).range() !== 'unicast') {
cb(new Error('Internal hostname'), '', 4)
return
}
}
if (addrinfo.length === 0) {
cb(new Error(`Unable to resolve ${hostname}`), '', 4)
Source: PostHog commit 6e8f035. The patch introduces a custom DNS staticLookup that resolves the hostname, parses each returned address with ipaddr.js, and rejects any address outside the unicast range before the HTTP request is dispatched.
Detection Methods for CVE-2025-1521
Indicators of Compromise
- Outbound HTTP requests originating from the PostHog plugin-server process to RFC1918 ranges, loopback (127.0.0.0/8), or link-local addresses such as 169.254.169.254.
- Slack webhook integrations configured with destinations that are not hooks.slack.com.
- Unexpected access entries in cloud metadata service logs correlated with the PostHog host's IP.
- Audit log entries showing webhook configuration changes by non-administrative users.
Detection Strategies
- Inspect PostHog integration records for slack_incoming_webhook values that do not match the expected Slack API hostname.
- Monitor egress traffic from PostHog servers for connections to internal subnets or cloud metadata endpoints.
- Correlate authenticated API calls that create or modify webhook integrations against the identity of the requesting user and the resulting outbound request destination.
Monitoring Recommendations
- Enable verbose logging on the PostHog plugin-server fetch utility to capture URL destinations and DNS resolution results.
- Forward PostHog application logs and host network telemetry to a centralized analytics platform for correlation.
- Alert on any 2xx responses from internal IP space delivered to the PostHog backend following a webhook configuration event.
How to Mitigate CVE-2025-1521
Immediate Actions Required
- Update PostHog to a version containing commit 6e8f035f9acd339c5ba87ba6ea40fc1ab3053d42 or later.
- Audit all configured Slack webhook integrations and remove any pointing to non-Slack hosts.
- Rotate any secrets, API tokens, or cloud credentials potentially exposed through the PostHog service account.
- Restrict which authenticated users can create or modify integrations within PostHog.
Patch Information
PostHog addressed the issue in commit 6e8f035 by introducing a DNS pre-resolution step in trackedFetch that rejects hostnames resolving to non-unicast IP ranges. Review the PostHog GitHub commit 6e8f035 and the Zero Day Initiative advisory ZDI-25-096 for full technical context and version guidance.
Workarounds
- Place PostHog behind an egress proxy that enforces an allowlist limited to legitimate Slack API hostnames.
- Block outbound traffic from the PostHog host to RFC1918, loopback, and cloud metadata endpoints such as 169.254.169.254 at the firewall level.
- Use network segmentation to prevent the PostHog service from reaching internal management interfaces.
- Require administrator approval for the creation of new webhook integrations until patching is complete.
# Example egress restriction using iptables on the PostHog host
# Block access to AWS/GCP/Azure instance metadata service
iptables -A OUTPUT -m owner --uid-owner posthog -d 169.254.169.254 -j REJECT
# Block outbound to RFC1918 private ranges from the PostHog service user
iptables -A OUTPUT -m owner --uid-owner posthog -d 10.0.0.0/8 -j REJECT
iptables -A OUTPUT -m owner --uid-owner posthog -d 172.16.0.0/12 -j REJECT
iptables -A OUTPUT -m owner --uid-owner posthog -d 192.168.0.0/16 -j REJECT
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

