CVE-2017-1000043: Mapbox.js Content Injection Vulnerability
MODERATECVE-2017-1000043 is a MODERATE (CVSS 6.1) content injection vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Mapbox.js libraries in the npm ecosystem. The issue involves content injection via tilejson name in mapbox.js. Remediation is available by upgrading affected packages to version 1.6.6, 2.2.4.
CVE-2017-1000043 at a Glance
Security Impact
CVSS: 6.1
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:C/C:L/I:L/A:N).
How to Fix CVE-2017-1000043
To remediate this vulnerability, upgrade all affected Mapbox.js 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 mapbox.js@1.6.6
npm install mapbox.js@2.2.4
Upgrade mapbox-rails to 1.6.6
Upgrade mapbox-rails to 2.2.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mapbox.js
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-1000043, inspect your project dependencies using npm:
npm ls mapbox.js
Analyze the terminal output to locate any version of Mapbox.js in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.6), your application is affected.
Note: The npm ls mapbox.js 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 Mapbox.js, 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-2017-1000043 Affected Mapbox.js Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mapbox.js
|
npm |
< 1.6.6
|
1.6.6
|
|
mapbox.js
|
npm |
≥ 2.0.0
< 2.2.4
|
2.2.4
|
|
mapbox-rails
|
RubyGems |
≥ 1.0.0
< 1.6.6
|
1.6.6
|
|
mapbox-rails
|
RubyGems |
≥ 2.0.0
< 2.2.4
|
2.2.4
|
References
Frequently Asked Questions
What is CVE-2017-1000043?
Which Mapbox.js versions are affected?
What version fixes CVE-2017-1000043?
Is mapbox.js affected?
Is mapbox-rails affected?
What is the CVSS score of CVE-2017-1000043?
What CWE is associated with CVE-2017-1000043?
How can I check npm dependencies for CVE-2017-1000043?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q69p-5h74-w36f",
"modified" : "2023-03-27T22:19:37Z",
"published" : "2018-11-09T17:48:34Z",
"aliases" : [ "CVE-2017-1000043" ],
"summary" : "Content Injection via TileJSON Name in mapbox.js",
"details" : "Versions 1.x prior to 1.6.6 and 2.x prior to 2.2.4 of `mapbox.js` are vulnerable to a cross-site-scripting attack in certain uncommon usage scenarios.\n\nIf `L.mapbox.map` or `L.mapbox.shareControl` are used in a manner that gives users control of the TileJSON content, it is possible to inject script content into the name value of the TileJSON. After clicking on the share control, the malicious code will execute in the context of the page using Mapbox.js.\n\n\n\n## Recommendation\n\nVersion 1.x: Update to version 1.6.6 or later.\nVersion 2.x: Update to version 2.2.4 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mapbox.js"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "mapbox.js"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.2.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "mapbox-rails"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.6.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "mapbox-rails"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.2.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-1000043"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/99245"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-q69p-5h74-w36f"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/mapbox-rails/CVE-2017-1000043.yml"
}, {
"type" : "WEB",
"url" : "https://nodesecurity.io/advisories/74"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/74"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:51:13Z",
"nvd_published_at" : "2017-07-17T13:18:00Z"
}
}