Skip to main content

MapServer EUVDEUVD-2026-131823

| CVE-2026-77327 MEDIUM
SQL Injection (CWE-89)
2026-11-20 security-advisories@github.com
6.9
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Control untrusted source layer attribute
  2. Delivery
    Inject SQL payload into DBF/shapefile field
  3. Exploit
    MapServer builds unescaped MySQL JOIN query
  4. Execution
    Database executes tautological WHERE predicate
  5. Impact
    Unrelated join-table records exposed

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires MapServer built with MySQL JOIN support (WITH_MYSQL=ON / USE_MYSQL) and a LAYER configured with a JOIN using CONNECTIONTYPE MYSQL; the source feature attribute named in JOIN ... FROM must be attacker-influenceable, e.g. through an imported shapefile/DBF or another untrusted spatial data source (second-order injection). Limiting factors: MySQL JOIN is an optional, non-default build/configuration, so deployments without it are unaffected; the attacker must be able to control the source attribute value; and impact is confined to the query executed against the join table (a SELECT), exposing unintended rows. The fix rejects non-numeric target values, so only numeric-looking keys are accepted post-patch. Echoing JOIN output through templates/query responses makes the leaked rows observable, but the injection itself succeeds regardless of whether results are rendered back.

Impact

CVSS 4.0 rates this 6.9 (Medium), and the vector is informative: the vulnerable-system impacts are all N (VC:N/VI:N/VA:N) while the harm lands on the subsequent system as SC:L/SI:L - i.e. MapServer itself is not compromised, but the back-end MySQL/MariaDB JOIN table can leak or return unintended rows. AV:N/AC:L/PR:N/UI:N looks severe in isolation, but the real-world trigger is a second-order path: the attacker must get a malicious value into a source feature attribute (shapefile/DBF or other spatial source) referenced by JOIN ... FROM, and MySQL JOIN support must be compiled in and configured - which the published CVSS vector does not reflect as an attack requirement. No EPSS score is provided and the CVE is not in CISA KEV, so there is no confirmed active exploitation; the vuln.today decision label is 'this_month', not act_now/emergency. A detailed public PoC reference exists in the GHSA advisory (reproduction steps against 8.6.4), but it is not verified as packaged working exploit code. Net: a legitimate, well-documented SQL injection worth patching on a normal monthly cadence rather than an emergency - its reach is gated by the optional MySQL JOIN feature and by whether an attacker can influence source layer attributes.

Exploit ScenarioDerived

An attacker supplies or modifies an untrusted shapefile/DBF whose attribute referenced by JOIN ... FROM (e.g. FNAME) is set to a value like '10 OR 1=1'. When MapServer processes a query that triggers the MySQL JOIN, that value is concatenated unescaped into 'SELECT * FROM <table> WHERE <col> = 10 OR 1=1', turning a single-key lookup into a tautology and returning unrelated rows from the MySQL/MariaDB join table. A step-by-step public PoC reference exists in the GHSA advisory, though it is not verified as packaged working exploit code.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 1.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 20, 2026

Second-order SQL injection in MapServer's MySQL JOIN implementation (src/mapjoin.c, versions prior to 8.6.5) lets an attacker who can influence the source layer attribute named in JOIN ... FROM rewrite the intended JOIN predicate and pull unintended rows out of the MySQL/MariaDB join table into output templates, query responses or downstream application logic. Exposure is conditional: the server must be built with MySQL support (WITH_MYSQL=ON / USE_MYSQL) and carry a LAYER JOIN with CONNECTIONTYPE MYSQL, and the attacker must be able to control that source attribute, typically via imported shapefile/DBF data or another untrusted spatial source. CVSS 4.0 scores it 6.9 (Medium), with the severity concentrated on the subsequent system (SC:L/SI:L) rather than on MapServer itself; a detailed proof-of-concept reproduction is published in the GitHub advisory GHSA-7624-4mwh-9cxr, and the issue is not listed in CISA KEV.

RemediationAI

Upgrade to MapServer 8.6.5, the release that contains the fix (https://github.com/MapServer/MapServer/releases/tag/rel-8-6-5); the underlying changes are in commits b1aa22b1ea4ba4293c0fddea92e01ce0dc18a300 and f4f95059e2610d431e0b46d75d713cd52b84f64c, delivered through pull requests 7547 and 7567, with details in advisory GHSA-7624-4mwh-9cxr. Because the patched code validates joininfo->target with strtoll and rejects any value that is not entirely numeric, expect layers whose JOIN ... FROM attribute holds non-numeric keys to start failing with an MS_JOINERR after the upgrade, so test join layers against representative data before rolling out. If an immediate upgrade is not possible, remove or disable the MySQL JOIN layers (delete the JOIN block from the mapfile or switch the layer off) on any service where the FROM attribute derives from untrusted shapefile, DBF or other imported spatial data; alternatively rebuild MapServer without WITH_MYSQL/USE_MYSQL where MySQL JOIN functionality is not actually used, which removes the vulnerable code path at the cost of the JOIN feature. Where the JOIN must stay in service before patching, restrict write access to the spatial data and DBF attributes feeding the FROM column and keep the joined columns out of exposed templates and query responses, though this only reduces observability of the leak, not the injection itself.

Affected VersionsENISA

MapServer < 8.6.5

Affected Packages

euvd mapserver fix: 8.6.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is CWE-89 SQL injection arising from a second-order data flow in MapServer's MySQL JOIN code. When a layer defines a JOIN with CONNECTIONTYPE MYSQL, msJoinConnect/msJoinPrepare copies the source feature attribute selected by JOIN ... FROM into joininfo->target (joininfo->target = msStrdup(shape->values[joininfo->fromindex])), and msMySQLJoinNext() later interpolates that stored value directly into snprintf(qbuf, sizeof(qbuf), "SELECT * FROM %s WHERE %s = %s", join->table, joininfo->tocolumn, joininfo->target) with no parameterization or escaping. Because the payload is persisted in the source data and reused at query-build time rather than submitted in the request, this is a classic second-order injection: a crafted attribute such as "0 OR 1=1" converts a single-key lookup into a tautology, so the SELECT returns unrelated rows from the MySQL/MariaDB join table. The statement is a SELECT, so the impact class is confidentiality/integrity of the joined dataset (unintended records disclosed to templates and downstream consumers), not code execution or denial of service. MySQL JOIN is an optional, non-default build and configuration path, which is why the assessed CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N) treats the attack as high complexity and scopes the impact to the subsequent system. The upstream fix in 8.6.5 rejects any target value that is not a complete numeric string (strtoll with an endptr check on the whole value) and backtick-escapes the table and column names via msReplaceSubstring before building the query.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
vuln.today AI 5.4 MEDIUM

Second-order injection depends on optional MySQL JOIN config and attacker-controlled source data (AC:H); it crosses into a separate database (S:C) exposing/altering limited join-table rows (C:L/I:L, A:N).

3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Nov 20, 2026 - 21:04 EUVD
CVE Published
Nov 20, 2026 - 19:18 cve.org
MEDIUM 6.9

DescriptionCVE.org

MapServer is a system for developing web-based GIS applications. Prior to 8.6.5, MapServer's MySQL JOIN implementation in src/mapjoin.c copies the source layer attribute selected by JOIN ... FROM into joininfo->target and inserts it into the query built by msMySQLJoinNext() without parameterization or SQL escaping. When MySQL JOIN support is enabled, an attacker who can control that source feature attribute, including through imported shapefile or DBF data or another untrusted spatial source, can inject SQL operators or expressions that change the intended JOIN predicate. This can bypass the intended key comparison and expose unrelated records from the MySQL or MariaDB JOIN table through output templates, query responses, or downstream application logic. This issue is fixed in version 8.6.5.

Threat Intelligence Overview

EPSS Score
1.2%
Top 32% exploitable
Prevalence
Low
niche industry-specific GIS web server; MySQL JOIN build optional and uncommon
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 1.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

35
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy