Skip to main content

CVE-2022-0699: CWE-416 in shapelib

Critical
VulnerabilityCVE-2022-0699cvecve-2022-0699cwe-416
Published: Mon Oct 17 2022 (10/17/2022, 00:00:00 UTC)
Source: CVE
Vendor/Project: n/a
Product: shapelib

Description

A double-free condition exists in contrib/shpsort.c of shapelib 1.5.0 and older releases. This issue may allow an attacker to cause a denial of service or have other unspecified impact via control over malloc.

AI-Powered Analysis

AILast updated: 07/06/2025, 17:26:36 UTC

Technical Analysis

CVE-2022-0699 is a critical vulnerability identified in shapelib version 1.5.0 and earlier. The flaw is a double-free condition located in the contrib/shpsort.c source file. A double-free vulnerability occurs when a program calls free() twice on the same memory address, which can corrupt the memory management data structures. This corruption can lead to undefined behavior including program crashes, denial of service (DoS), or potentially arbitrary code execution if an attacker can manipulate the heap layout. In this case, the vulnerability allows an attacker to control malloc behavior, which could be exploited to disrupt normal application operation or escalate to more severe impacts. The CVSS v3.1 score is 9.8, indicating a critical severity with network attack vector, no privileges required, no user interaction, and high impact on confidentiality, integrity, and availability. Although no known exploits are currently reported in the wild, the vulnerability's characteristics make it a high-risk issue, especially for applications that process untrusted shapefile data using shapelib. Shapelib is a widely used open-source library for reading and writing ESRI shapefiles, a popular geospatial vector data format. The vulnerability resides in a core sorting component, which is likely invoked during shapefile processing, making exploitation feasible if malicious shapefiles are ingested.

Potential Impact

For European organizations, the impact of CVE-2022-0699 can be significant, particularly for those involved in geospatial data processing, geographic information systems (GIS), urban planning, environmental monitoring, and related sectors. Many European public agencies, utilities, transportation companies, and private firms rely on shapefiles and tools built on shapelib for spatial data analysis and decision-making. Exploitation could lead to denial of service conditions, disrupting critical services or workflows dependent on geospatial data. Furthermore, the potential for arbitrary code execution could allow attackers to compromise systems, steal sensitive geospatial information, or pivot within networks. Given the criticality of infrastructure and data in Europe, such disruptions could have cascading effects on public safety, logistics, and regulatory compliance. The vulnerability's network-exploitable nature means that any system exposing shapefile processing capabilities to untrusted sources is at risk, increasing the attack surface for European organizations that integrate geospatial data from external providers or public sources.

Mitigation Recommendations

To mitigate CVE-2022-0699, European organizations should: 1) Immediately identify and inventory all software and systems using shapelib version 1.5.0 or older. 2) Apply patches or upgrade to a fixed version of shapelib if available; if no official patch exists, consider applying community patches or backported fixes addressing the double-free issue. 3) Implement strict input validation and sanitization for all shapefile data, especially from untrusted or external sources, to reduce the risk of malicious payloads triggering the vulnerability. 4) Employ sandboxing or containerization for applications processing shapefiles to limit the impact of potential exploitation. 5) Monitor logs and network traffic for anomalous behavior indicative of exploitation attempts, such as unexpected crashes or memory errors in GIS applications. 6) Restrict network exposure of services that process shapefiles to trusted networks and users only. 7) Conduct security assessments and penetration testing focused on geospatial data processing components to identify residual risks. These steps go beyond generic advice by focusing on the specific context of shapelib usage and the nature of the vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
fedora
Date Reserved
2022-02-21T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682cd0fc1484d88663aecbcb

Added to database: 5/20/2025, 6:59:08 PM

Last enriched: 7/6/2025, 5:26:36 PM

Last updated: 7/31/2025, 4:12:57 AM

Views: 11

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats