Miggo Logo

CVE-2025-1520:
PostHog Plugin Server SQL Injection Vulnerability

7.1

CVSS Score
3.0

Basic Information

EPSS Score
0.72426%
Published
4/23/2025
Updated
4/23/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.0/AV:A/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
@posthog/plugin-servernpm<= 1.10.7

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is described as a PostHog Plugin Server SQL Injection. The provided commit (6e8f035f9acd339c5ba87ba6ea40fc1ab3053d42) modifies the trackedFetch function in plugin-server/src/utils/fetch.ts. This commit primarily implements an SSRF (Server-Side Request Forgery) mitigation by adding a custom DNS lookup (staticLookup) to restrict fetch operations to unicast IP addresses, preventing access to internal services.

Although the commit directly addresses SSRF, it is linked by advisories (e.g., GHSA-v64v-fq96-c5wv) as the fix for the described SQL injection vulnerability. This implies that the SSRF vector exploitable via trackedFetch was a prerequisite or pathway to the SQL injection. The trackedFetch function processes a user-supplied URL. In its pre-patch state, it lacked sufficient restrictions on where it could fetch data from in production environments. This allowed an attacker to potentially specify a URL that, when fetched, would return malicious data. This data (or parts of the URL itself) could then be used insecurely in downstream SQL query construction, leading to SQL injection, as per the vulnerability description regarding 'lack of proper validation of a user-supplied string'.

Therefore, trackedFetch is identified as the vulnerable function because it processed potentially malicious user input (the URL) in a way that could lead to the SQL injection. The patch hardens trackedFetch against SSRF, which in turn closes off the identified vector for the SQL injection. The confidence is 'medium' because the commit directly shows an SSRF fix, and its connection to SQL injection is based on the advisory linking and the inference that fetched content was the source of the SQL injection string. No SQL parsing or query construction functions are directly modified in this commit, suggesting trackedFetch was an entry point for the malicious data rather than the site of the SQL parsing flaw itself.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

Post*o* *li*k*ous* T**l* *un*tions SQL Inj**tion R*mot* *o** *x**ution Vuln*r**ility. T*is vuln*r**ility *llows n*twork-**j***nt *tt**k*rs to *x**ut* *r*itr*ry *o** on *****t** inst*ll*tions o* Post*o*. *ut**nti**tion is r*quir** to *xploit t*is vuln

Reasoning

T** vuln*r**ility is **s*ri*** *s * Post*o* Plu*in S*rv*r SQL Inj**tion. T** provi*** *ommit (****************************************) mo*i*i*s t** `tr**k****t**` *un*tion in `plu*in-s*rv*r/sr*/utils/**t**.ts`. T*is *ommit prim*rily impl*m*nts *n SS