Miggo Logo

GHSA-78p3-fwcq-62c2:
@saltcorn/server Remote Code Execution (RCE) / SQL injection via prototype pollution by manipulating `lang` and `defstring` parameters when setting localizer strings

7.2

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
10/3/2024
Updated
10/4/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
@saltcorn/servernpm<= 1.0.0-beta.131.0.0-beta.14

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the route handler in infoarch.js that processes user-supplied 'lang' and 'defstring' parameters. These parameters are directly used as object keys (cfgStrings[lang][defstring]) without validation, enabling prototype pollution. The PoC demonstrates how polluted properties (tempRootFolder in PluginInstaller and schema in PostgreSQL queries) are later exploited. The commit patch specifically adds validation checks in this handler, confirming it as the root cause. While other functions (PluginInstaller constructor, PostgreSQL select) consume polluted properties, they are secondary exploitation points rather than the primary vulnerability source.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry T** *n*point `/sit*-stru*tur*/lo**liz*r/s*v*-strin*/:l*n*/:***strin*` ****pts two p*r*m*t*r v*lu*s: `l*n*` *n* `***strin*`. T**s* v*lu*s *r* us** in *n uns*** w*y to s*t t** k*ys *n* v*lu* o* t** `***Strin*s` o*j**t. It *llows to ***/mo*

Reasoning

T** vuln*r**ility st*ms *rom t** rout* **n*l*r in `in*o*r**.js` t**t pro**ss*s us*r-suppli** 'l*n*' *n* '***strin*' p*r*m*t*rs. T**s* p*r*m*t*rs *r* *ir**tly us** *s o*j**t k*ys (`***Strin*s[l*n*][***strin*]`) wit*out v*li**tion, *n**lin* prototyp* p