React. XSS via a spoofed React element on versions under 0.14.0.

Impact area

Security

Severity

low

Affected element

ServiceNow

UI Script

Salesforce

Static Resource


Rule number

SN-JSL-REACT-LESSTHAN-V0140 (for ServiceNow)

SF-JSL-REACT-LESSTHAN-V0140 (for Salesforce)

Impact

Including untrusted objects as React children can result in an XSS security vulnerability. This one took advantage of the way the arguments passed to React functions were being validated, tricking React into thinking it was rendering a React element instead of the string that was expected.

Remediation

Update the React JS library to the latest version.

Time to fix

30 min

References

This rule is linked to Common Weakness Enumeration CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')..




Last modified on Jan 31, 2023