Client-Side Template Injection

medium Web App Scanning Plugin ID 112684

Synopsis

Client-Side Template Injection

Description

Modern web applications often rely on client-side template frameworks to render views to their users.

A Client-Side Template Injection (CSTI) vulnerability exists when an application embeds and evaluates unsafe user-controlled expressions in its client-side templates.

By injecting a specific payload dependent on the template framework used by the application, an attacker can leverage this vulnerability to conduct cross-site scripting attacks.

Solution

Developers should avoid embedding user inputs when dynamically building client-side templates. If the application still requires this type of inputs, the expression syntax related to the framework being used should be sanitized prior embedding it in the client-side template.

See Also

https://docs.angularjs.org/guide/security

https://github.com/tijme/angularjs-csti-scanner

https://ryhanson.com/angular-expression-injection-walkthrough

https://ryhanson.com/stealing-session-tokens-on-plunker-with-an-angular-expression-injection

https://vuejs.org/v2/guide/security.html

Plugin Details

Severity: Medium

ID: 112684

Type: remote

Family: Injection

Published: 1/29/2021

Updated: 6/9/2023

Scan Template: full, pci, scan

Risk Information

VPR

Risk Factor: Medium

Score: 5.2

CVSS v2

Risk Factor: High

Base Score: 7.5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS Score Source: Tenable

CVSS v3

Risk Factor: High

Base Score: 7.1

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L

CVSS Score Source: Tenable

CVSS v4

Risk Factor: Medium

Base Score: 5.1

Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L

CVSS Score Source: Tenable

Reference Information