Vulnerabilities in pkg:npm/react-native-webview
PACKAGECVE-2020-6506 is a MODERATE (CVSS 6.5) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting React native webview libraries in the npm ecosystem. The issue involves android webview universal cross-site scripting. Remediation is available by upgrading affected packages to version 11.0.0.
pkg:npm/react-native-webview
Vulnerability advisories affecting package pkg:npm/react-native-webview. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-36j3-xxf7-4pqg | CVE-2020-6506 | MODERATE | Android WebView Universal Cross-site Scripting |
CVE-2020-6506 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).
How to Fix CVE-2020-6506
To remediate this vulnerability, upgrade all affected React native webview dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install react-native-webview@11.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls react-native-webview
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-6506, inspect your project dependencies using npm:
npm ls react-native-webview
Analyze the terminal output to locate any version of React native webview in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.0.0), your application is affected.
Note: The npm ls react-native-webview command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In React native webview, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-6506 Affected React native webview Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
react-native-webview
|
npm |
< 11.0.0
|
11.0.0
|
References
Frequently Asked Questions
What is CVE-2020-6506?
Which React native webview versions are affected?
What version fixes CVE-2020-6506?
Is react-native-webview affected?
What is the CVSS score of CVE-2020-6506?
What CWE is associated with CVE-2020-6506?
How can I check npm dependencies for CVE-2020-6506?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-36j3-xxf7-4pqg",
"modified" : "2022-08-03T23:40:07Z",
"published" : "2020-10-02T16:22:41Z",
"aliases" : [ "CVE-2020-6506" ],
"summary" : "Android WebView Universal Cross-site Scripting",
"details" : "A universal cross-site scripting (UXSS) vulnerability, CVE-2020-6506 (https://crbug.com/1083819), has been identified in the Android WebView system component, which allows cross-origin iframes to execute arbitrary JavaScript in the top-level document. This vulnerability affects React Native apps which use a `react-native-webview` that allows navigation to arbitrary URLs, and when that app runs on systems with an Android WebView version prior to 83.0.4103.106.\n\n## Pending mitigation\n\nEnsure users update their Android WebView system component via the Google Play Store to 83.0.4103.106 or higher to avoid this UXSS. 'react-native-webview' is working on a mitigation but it could take some time.\n\n### References\n\nhttps://alesandroortiz.com/articles/uxss-android-webview-cve-2020-6506/\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "react-native-webview"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "11.0.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 10.10.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/react-native-community/react-native-webview/security/advisories/GHSA-36j3-xxf7-4pqg"
}, {
"type" : "WEB",
"url" : "https://github.com/react-native-webview/react-native-webview/security/advisories/GHSA-36j3-xxf7-4pqg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-6506"
}, {
"type" : "WEB",
"url" : "https://github.com/react-native-webview/react-native-webview/pull/1747"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1560"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202101-30"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202007-08"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rf082834ad237f78a63671aec0cef8874f9232b7614529cc3d3e304c5@%3Ccommits.cordova.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rc81e12fc9287f8743d59099b1af40f968f1cfec9eac98a63c2c62c69@%3Cissues.cordova.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rc0ebe639927fa09e222aa56bf5ad6e700218f334ecc6ba9da4397728@%3Cissues.cordova.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/ra58733fbb88d5c513b3f14a14850083d506b9129103e0ab433c3f680@%3Cissues.cordova.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r2769c33da7f7ece7e4e31837c1e1839d6657c7c13bb8d228670b8da0@%3Cissues.cordova.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r1eadf38b38ee20405811958c8a01f78d6b28e058c84c9fa6c1a8663d@%3Cissues.cordova.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r1ab80f8591d5c2147898076e3945dad1c897513630aabec556883275@%3Cissues.cordova.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://github.com/react-native-webview/react-native-webview/releases/tag/v11.0.0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/react-native-community/react-native-webview"
}, {
"type" : "WEB",
"url" : "https://crbug.com/1083819"
}, {
"type" : "WEB",
"url" : "https://chromereleases.googleblog.com/2020/06/stable-channel-update-for-desktop_15.html"
}, {
"type" : "WEB",
"url" : "https://alesandroortiz.com/articles/uxss-android-webview-cve-2020-6506"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79", "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-10-02T16:22:01Z",
"nvd_published_at" : "2020-07-22T17:15:00Z"
}
}