Miggo Logo

CVE-2021-3983: Cross-site Scripting in kimai2

6.3

CVSS Score
3.0

Basic Information

EPSS Score
0.43248%
Published
12/3/2021
Updated
2/1/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
kevinpapst/kimai2composer< 1.16.31.16.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from unescaped user-controlled input being inserted into HTML through JavaScript template replacements. The patch adds an escape() method that replaces &, <, and > with HTML entities. Specifically in KimaiRecentActivities.js, the lines replacing %customer%, %project%, and %activity% placeholders were vulnerable as they directly used untrusted input without escaping. The commit clearly shows escaping was added to these exact template replacement points, confirming they were the vulnerable code paths.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

kim*i* is vuln*r**l* to Improp*r N*utr*liz*tion o* Input *urin* W** P*** **n*r*tion ('*ross-sit* S*riptin*').

Reasoning

T** vuln*r**ility st*ms *rom un*s**p** us*r-*ontroll** input **in* ins*rt** into *TML t*rou** J*v*S*ript t*mpl*t* r*pl***m*nts. T** p*t** ***s *n `*s**p*()` m*t*o* t**t r*pl***s &, <, *n* > wit* *TML *ntiti*s. Sp**i*i**lly in `Kim*iR***nt**tiviti*s.j