
Cloud Vulnerability DB
A community-led vulnerabilities database
The Cross-Site Scripting (XSS) vulnerability in React (GHSA-hg79-j56m-fxgv) affects versions prior to 0.14.0. The vulnerability was discovered in March 2015 and was publicly disclosed in September 2020. The issue affects the React JavaScript library's createElement function, which failed to properly validate input objects, potentially allowing attackers to execute arbitrary JavaScript code in victims' browsers (GitHub Advisory).
The vulnerability stems from React's createElement method not properly validating its input object. Attackers could exploit this by passing a specially crafted JSON object that includes properties like _isReactElement, _store, type, and props with dangerouslySetInnerHTML, which React would then render as an element instead of treating it as a string. This bypass of input validation could lead to arbitrary HTML injection and subsequent JavaScript execution (React Blog).
When successfully exploited, this vulnerability allows attackers to execute arbitrary JavaScript code in a victim's browser through Cross-Site Scripting (XSS). This could potentially lead to theft of sensitive information, session hijacking, or other malicious actions performed in the context of the affected web application (Snyk).
The vulnerability was demonstrated to be exploitable by creating a specially crafted JSON object that spoofs a React element. The exploit involves setting specific properties like _isReactElement to true and including malicious HTML content through the dangerouslySetInnerHTML property. This allows the attacker to bypass React's normal input validation and sanitization mechanisms (React Blog).
The recommended mitigation is to upgrade React to version 0.14.0 or higher, which includes proper validation of React elements. The fix prevents the spoofing of React elements by implementing additional security checks and validation mechanisms for element creation (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."