Miggo Logo

CVE-2022-0539: Cross-site Scripting in Beanstalk console

6.3

CVSS Score
3.0

Basic Information

EPSS Score
0.49989%
Published
2/10/2022
Updated
2/3/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
ptrofimov/beanstalk_consolecomposer< 1.7.141.7.14

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from unescaped output in PHP template files. The commit adds htmlspecialchars() to multiple echo statements that output user-controlled values:

  1. In main.php, server names ($serverItem) were directly embedded in href attributes and link text
  2. In serversList.php, server labels and parameters ($label, $server) were rendered without sanitization These locations allowed stored XSS via malicious server names/parameters. The patch confirms vulnerability by adding context-appropriate escaping, indicating these were the injection points.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

***nst*lk *onsol* (ptro*imov/***nst*lk_*onsol*) prior to *.*.** is vuln*r**l* to *ross-sit* s*riptin*.

Reasoning

T** vuln*r**ility st*ms *rom un*s**p** output in P*P t*mpl*t* *il*s. T** *ommit ***s *tmlsp**i*l***rs() to multipl* ***o st*t*m*nts t**t output us*r-*ontroll** v*lu*s: *. In m*in.p*p, s*rv*r n*m*s ($s*rv*rIt*m) w*r* *ir**tly *m****** in *r** *ttri*ut