CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-76905

CVE-2026-76905: Denial of Service via Nil-Pointer Dereference in getkin/kin-openapi openapi3filter

Alon Barad
Alon Barad
Software Engineer

Aug 22, 2026·6 min read·62 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can crash servers using getkin/kin-openapi (v0.10.0 to v0.140.0) by transmitting a malformed multipart/form-data request, triggering a nil-pointer dereference panic in the error validation encoder.

CVE-2026-76905 is a high-severity Denial of Service (DoS) vulnerability in the getkin/kin-openapi library, specifically inside the openapi3filter sub-package. When processing multipart/form-data request validation errors, a missing nil-pointer guard causes a Go runtime panic during error formatting. This panic terminates the active server process if no recovery handler is present, resulting in a total denial of service. The vulnerability affects versions from v0.10.0 to v0.140.0, and is resolved in v0.141.0.

Vulnerability Overview

The getkin/kin-openapi library is a standard tool in the Go ecosystem for validating, parsing, and verifying HTTP traffic against OpenAPI specification files. Within this ecosystem, the openapi3filter sub-package is frequently implemented as request-validation middleware. This middleware exposes an attack surface to arbitrary remote inputs, parsing request parameters and incoming message bodies before handing them off to downstream controllers.

When openapi3filter encounters a schema discrepancy, it constructs a structural parsing or validation error representation. Downstream services routinely invoke validation helpers such as openapi3filter.ConvertErrors or the ValidationErrorEncoder to translate these internally generated validation errors into client-facing JSON objects. This conversion step acts as the precise point of failure.

The underlying security issue resides within the error translation logic. During parsing of certain complex payloads, the translation routine attempts to access properties of structural references that were never initialized. This logic gap results in a NULL pointer dereference, classified under CWE-476. The vulnerability manifests when formatting validation errors for malformed requests.

Root Cause Analysis

The bug is located within the convertParseError helper function inside openapi3filter/validation_error_encoder.go. The validation subsystem defines a core struct named RequestError which maintains metadata regarding the validation failure context. A RequestError can point to parameter-based input violations or body-based input violations, but never both simultaneously.

When a request body is validated (such as a multipart or JSON structure), the parameter validation struct member e.Parameter is explicitly initialized as nil. However, if the error relates to a URI query parameter, e.Parameter contains a reference to the active parameter specification. This logic expects downstream code paths to respect the optional nature of this property.

During multipart/form-data processing, a non-string and non-numeric scalar field that violates schema type guidelines yields a nested structure containing an outer *ParseError wrapping an inner core failure. This nesting triggers a specific code branch in convertParseError that attempts to verify whether the root cause represents an invalid query parameter format.

The logic attempts to evaluate rootErr.Kind == KindInvalidFormat && e.Parameter.In == "query". Because the validation error originated inside the request body, e.Parameter is nil. When the engine attempts to evaluate e.Parameter.In, it dereferences a NULL pointer, throwing a panic that is not recovered inside the validation library itself.

Code Analysis

Analyzing the vulnerable logic before and after commit 1d0a337c9b1570fab283be8a04c8af6e43b9a22c reveals the exact structural fault and its corrective patch.

Prior to the patch, the vulnerability in openapi3filter/validation_error_encoder.go was structured as follows:

func convertParseError(e *RequestError, innerErr *ParseError) *ValidationError {
    // ...
    } else if innerErr.RootCause() != nil {
        // e.Parameter is dereferenced directly without verifying if it is nil
        if rootErr, ok := innerErr.Cause.(*ParseError); ok &&
            rootErr.Kind == KindInvalidFormat && e.Parameter.In == "query" {
            return &ValidationError{
                Status: http.StatusBadRequest,
                Title: fmt.Sprintf("parameter %q in %s is invalid: %v is %s",
                    e.Parameter.Name, e.Parameter.In, rootErr.Value, rootErr.Reason),
            }
        }
        return &ValidationError{
            Status: http.StatusBadRequest,
            Title:  innerErr.Reason,
        }
    }
    return nil
}

The corresponding patch introduces a strict logical boundary that prevents NULL dereferencing. It updates the conditional branch using Go's short-circuit evaluation behavior:

func convertParseError(e *RequestError, innerErr *ParseError) *ValidationError {
 	} else if innerErr.RootCause() != nil {
 		if rootErr, ok := innerErr.Cause.(*ParseError); ok &&
-			rootErr.Kind == KindInvalidFormat && e.Parameter.In == "query" {
+			rootErr.Kind == KindInvalidFormat && e.Parameter != nil && e.Parameter.In == "query" {
 			return &ValidationError{
 				Status: http.StatusBadRequest,
 				Title: fmt.Sprintf("parameter %q in %s is invalid: %v is %s",
 					e.Parameter.Name, e.Parameter.In, rootErr.Value, rootErr.Reason),
 			}
 		}
+		// For body parse errors (e.Parameter == nil) the outer ParseError's
+		// Reason is often empty, e.g. the multipart decoder wraps a part's
+		// *ParseError without setting one. Fall back to the full error text so
+		// the response still carries a meaningful message.
+		title := innerErr.Reason
+		if title == "" {
+			title = innerErr.Error()
+		}
 		return &ValidationError{
 			Status: http.StatusBadRequest,
-			Title:  innerErr.Reason,
+			Title:  title,
 		}
 	}
 	return nil
}

By placing e.Parameter != nil before e.Parameter.In == "query", any body-based request error causes the logical evaluation of the if statement to fail immediately. The engine skips evaluating the properties of the nil reference, neutralizing the panic. The added fallback title formatting ensures that body-parsing errors return a valid description.

Exploitation Methodology

Exploiting CVE-2026-76905 requires a simple delivery sequence. The targeted application must process validation errors using openapi3filter.ConvertErrors or ValidationErrorEncoder to process user input failures.

The attack is initiated by submitting a multipart request containing a data representation error. The targeted API endpoint must be configured to process multipart/form-data with an OpenAPI schema containing a non-string or non-boolean scalar (e.g., an integer). The attacker transmits a payload containing a non-numeric string where the integer value is expected.

POST /v1/upload HTTP/1.1
Host: target-api.internal
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryXyZ
Content-Length: 185
 
------WebKitFormBoundaryXyZ
Content-Disposition: form-data; name="age"
 
notanumber
------WebKitFormBoundaryXyZ--

Upon processing the boundary parts, the server's internal parser fails to map "notanumber" to an integer object. It initializes a nested ParseError containing the structural failure but omits the initialization of e.Parameter. When the app formats the failure with ConvertErrors, the service dereferences e.Parameter, throwing a panic that shuts down the entire thread.

Impact Assessment

The primary impact is service unavailability. A single, small payload containing a malformed boundary value can terminate the active server process.

In Go, unrecovered panics are fatal. Unlike languages where exceptions are confined to localized runtime execution spaces, a Go panic that escapes the active HTTP routine halts the parent process. This results in an absolute Denial of Service (DoS) for all clients interacting with the system.

The vulnerability does not allow remote code execution, file system access, or privilege escalation. It has a CVSS v3.1 score of 7.5, reflecting a network-exploitable vector that requires low complexity and no special privilege states. The absence of data leakage or execution control limits the scope to availability.

Remediation & Defense

The definitive remediation for CVE-2026-76905 is updating the dependency version of github.com/getkin/kin-openapi to version v0.141.0 or higher.

If upgrading is not immediately possible, implement a structural panic-recovery middleware block. This wrapper catches escaped runtime panics and maps them to a normal HTTP error state, such as a 500 Internal Server Error, protecting the parent process.

func PanicRecoveryMiddleware(next http.Handler) http.Handler {
    return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
        defer func() {
            if err := recover(); err != nil {
                // Prevent server shutdown by catching the runtime error
                log.Printf("[SECURITY] Recovered from validation panic: %v", err)
                w.WriteHeader(http.StatusInternalServerError)
                w.Write([]byte(`{"error":"Internal Server Error"}`))
            }
        }()
        next.ServeHTTP(w, r)
    })
}

Additionally, validation processes can be modified to bypass calling ConvertErrors() when formatting incoming schema issues. Instead, check the error type directly in user code to generate client responses safely.

Official Patches

getkinSecurity Advisory GHSA-mmfr-pmjx-hw9w
getkinPatch Commit 1d0a337c9b1570fab283be8a04c8af6e43b9a22c

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected Systems

Go applications using getkin/kin-openapi in combination with openapi3filter validation handlers.

Affected Versions Detail

Product
Affected Versions
Fixed Version
github.com/getkin/kin-openapi
getkin
>= 0.10.0, < 0.141.0v0.141.0
AttributeDetail
CWE IDCWE-476
Attack VectorNetwork
CVSS Score7.5
EPSS PercentileN/A
ImpactDenial of Service (DoS)
Exploit StatusProof-of-Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-476
NULL Pointer Dereference

A NULL pointer dereference occurs when the application attempts to read or write to a memory address assumed to be valid but is instead NULL, triggering a crash.

Known Exploits & Detection

GitHubRegression test suite illustrating the crash vectors during request validation.

Vulnerability Timeline

Fix merged into repository main branch
2026-07-10
Release v0.141.0 containing the security patch
2026-08-21
GitHub Security Advisory GHSA-mmfr-pmjx-hw9w published
2026-08-21

References & Sources

  • [1]GitHub Security Advisory GHSA-mmfr-pmjx-hw9w
  • [2]Patch Commit 1d0a337c9b1570fab283be8a04c8af6e43b9a22c
  • [3]Release Tag v0.141.0

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-62683
3.1

CVE-2026-62683: Incorrect Authorization via Stale Public Shares in File Browser

File Browser versions prior to 2.63.17 contain an authorization and state-management flaw in the BoltDB storage backend. When an authenticated user deletes a shared directory via an HTTP request with a trailing slash (e.g., DELETE /api/resources/a/), the share cleanup routine queries the database index using the unnormalized path before stripping the trailing slash. Because canonical share paths are stored without trailing slashes (e.g., /a), the database prefix query fails to match the parent directory share record. If a directory with the same name is later recreated, the dormant public share hash automatically reactivates and exposes the new directory contents to unauthenticated users.

Alon Barad
Alon Barad
1 views•10 min read
•about 2 hours ago•CVE-2026-62297
7.5

CVE-2026-62297: Uncontrolled Memory Allocation and Denial of Service in ag-psd

An uncontrolled memory allocation vulnerability exists in ag-psd versions prior to 31.0.0. When parsing Adobe Photoshop Document (PSD) files, the readPsd() function reads image dimensions and color depth directly from the file header and allocates off-heap typed arrays without validating whether the requested memory size is proportional to the input stream or bounded by operational thresholds. An unauthenticated attacker can supply a crafted 52-byte PSD payload that triggers an immediate 3.35 GB memory allocation, resulting in process termination via the operating system Out-Of-Memory (OOM) killer.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 3 hours ago•CVE-2026-126297
7.5

CVE-2026-126297: Algorithmic Complexity Denial of Service in NLTK ConllCorpusReader

CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).

Amit Schendel
Amit Schendel
3 views•12 min read
•about 4 hours ago•CVE-2026-126298
7.5

CVE-2026-126298: Quadratic Algorithmic Complexity Denial of Service in NLTK Tree.chomsky_normal_form

CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.

Alon Barad
Alon Barad
6 views•12 min read
•about 5 hours ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
5 views•10 min read
•about 6 hours ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
2 views•11 min read