other
- Location
scripts/amap_personal_map_client.py:29- Finding
Personal Map Schema URL Disclosed to an Unrelated Third-Party QR Service
- Content
View full analysis
Vulnerability Details
File Location:
scripts/amap_personal_map_client.py:18-33andscripts/amap_personal_map_client.py:590-604
Vulnerability Type: Unauthorized Sensitive Data Disclosure
Risk Level: HighVulnerable Code
python def _generate_qr_code_url(schema_url, size="300x300"): """ Generate a QR-code image URL. Args: schema_url (str): AMap schema link size (str): QR-code dimensions Returns: str: QR-code image URL """ qr_service = "https://api.qrserver.com/v1/create-qr-code/" encoded_url = urlparse.quote(schema_url) qr_url = "{}?size={}&data={}".format(qr_service, size, encoded_url) return qr_urlThe personal map request and subsequent disclosure occur here:
python response = requests.post( wia_url, params=params, json=payload, headers=headers, timeout=15 ) result = response.json() if result.get("code") == 1 and result.get("result") == True: schema_url = result.get("data", {}).get("schemaUrl", "") if schema_url: qr_code_url = _generate_qr_code_url(schema_url) map_result = { "qr_code_url": qr_code_url, "lineList": lineList, "message": "Personal map QR code generated.", "schema_url": schema_url }The generated URL is subsequently downloaded in
scripts/amap_personal_map_client.py:38-53:python def download_qr_code(qr_code_url, output_path): try: import urllib.request urllib.request.urlretrieve(qr_code_url, output_path) return output_path except Exception as e: print(f"QR-code download failed: {e}") return NoneTechnical Analysis
The Skill legitimately sends map names, route points, POI identifiers, and precise coordinates to the declared AMap service to create a personal map. However, after AMa ...[truncated 2237 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the dependency on
api.qrserver.comand generate QR images locally using a vetted QR-code library. - Pass the schema URL only to the local QR encoder; do not place it in requests to external services.
- If third-party QR generation must remain available, make it explicitly opt-in and disclose:
- The third-party recipient.
- The exact data transmitted.
- The privacy and retention implications.
- Avoid placing access-bearing data in URL query strings.
- Use short-lived, revocable, and least-access map links where supported by AMap.
- Do not automatically download or render the QR image. Perform those actions only when requested by the user.
- Add tests that fail if schema URLs or itinerary data are sent to any hostname outside an explicit endpoint allowlist.
- Remove the dependency on
