Skip to main content

NiBabel CVE-2026-118590

| EUVDEUVD-2026-112560 MEDIUM
Memory Allocation with Excessive Size Value (CWE-789)
2026-10-29 VulDB
6.9
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

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

  1. Access
    Craft NIfTI header claiming huge data shape
  2. Exploit
    Deliver truncated file to nibabel-using app
  3. Execution
    array_from_file allocates oversized buffer pre-check
  4. Impact
    Memory exhaustion denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

The attacker must get a nibabel-using application to load an attacker-controlled neuroimaging file (e.g. via load()/get_fdata() or a direct array_from_file call) whose header declares a far larger data array than the file actually contains, over an uncompressed stream - on which the pre-patch code seeks no size check and allocates a buffer for the header-claimed shape. Limiting factors: impact is limited to availability (memory exhaustion / process crash), not data exposure or code execution; exploitation requires the victim to parse the malicious file, so true remote reach depends on a network-facing service accepting file uploads rather than the standalone library; and per the PR, compressed streams are still not checked up front but surface a short-read OSError when read.

Impact

This is a moderate-priority availability issue, not a critical flaw. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) scores the reachability generously as remote and unauthenticated, but the only impact metric set is VA:L - limited availability, with VC:N and VI:N confirming no confidentiality or integrity consequence. CWE-789 (uncontrolled memory allocation) and the PR diff corroborate that the outcome is memory exhaustion / denial of service, not code execution or data exposure. No EPSS score and no CISA KEV entry are provided, so there is no evidence of active exploitation; the decision label is 'this_month' (not 'act_now' or 'emergency'), consistent with a real-but-not-urgent fix. A public PoC reference exists (GitHub issue #1566 and the reproducer tests in PR #1587); it is not verified as working weaponized exploit code. A key caveat: nibabel is a file-parsing library with no network listener of its own, so the AV:N 'remote' characterization only holds when a network-facing application feeds attacker-controlled neuroimaging files to nibabel - verify against the actual deployment before treating this as remotely exploitable. The 'Information Disclosure' tag contradicts the vector (VC:N) and is incorrect for this availability-only bug.

Exploit ScenarioDerived

An attacker crafts a NIfTI file whose header declares an enormous data shape (e.g. 32767×32767×1000 float64) while the file body is truncated, then supplies it to an application that loads neuroimaging files with nibabel. On an uncompressed stream, the pre-patch array_from_file allocates a buffer sized to the header-claimed shape before checking the file actually contains that many bytes, exhausting memory and crashing the process. A public PoC reference and reproducer tests exist in the upstream issue/PR, but no verified weaponized exploit is reported.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

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

Alert me

AnalysisAIv1 – Oct 29, 2026

Loading a malformed neuroimaging file in NiBabel (nipy nibabel through 5.4.2) can exhaust process memory: array_from_file in nibabel/volumeutils.py allocates a buffer sized from the header-declared array shape before it verifies how many bytes the file actually contains, so a tiny file whose header claims a 2^60-byte array forces an enormous allocation instead of an early error. Impact is availability-only - memory exhaustion and process crash, with no data disclosure, integrity impact, or code execution - and requires the victim to parse an attacker-supplied, uncompressed file. Remote reach therefore depends on a network-facing service that accepts neuroimaging uploads rather than on the library in isolation; no public exploit code and no confirmed active exploitation were identified, and the upstream fix exists only as pull request #1587, which awaits acceptance.

RemediationAI

The complete fix is upstream pull request https://github.com/nipy/nibabel/pull/1587, which adds a pre-allocation size check to array_from_file; that PR awaits acceptance, so no patched release version is confirmed and operators should track https://github.com/nipy/nibabel/issues/1566 and pin to the first nibabel release that contains the change. Because the PR's new check covers only uncompressed streams - compressed inputs still raise the short-read OSError only when the data is actually read - converting uploads to gzip is not a mitigation. Until a release ships, isolate the exposure: run header/data parsing of untrusted neuroimaging files inside a worker process with a hard address-space (RLIMIT_AS) or cgroup memory cap so a huge claimed shape terminates the worker instead of the host service (trade-off: the worker still dies on malicious files, so upload handling must tolerate restarts), and cap accepted upload sizes and declared dimensions at the ingest boundary before calling load()/get_fdata() (trade-off: limits must be set above the largest legitimate study or valid scans will be rejected).

Affected VersionsENISA

nibabel 5.4.2
nibabel 5.4.0
nibabel 5.4.1

Affected Packages

euvd nibabel no fix

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

NiBabel is the reference Python reader/writer for NIfTI and related neuroimaging formats, and array_from_file (nibabel/volumeutils.py) is the low-level routine that materializes an array from a file object given a shape, dtype and offset taken from the parsed header. The flaw is CWE-789, uncontrolled memory allocation: the pre-patch code computed the expected byte count from the header-claimed shape and read the data, performing the short-read OSError check only after the buffer work had begun, so a header declaring an enormous shape drives allocation regardless of the real file size. The pull request's own tests demonstrate the trigger - a Nifti1Header with set_data_shape((32767, 32767, 1000)) and float64 dtype written to 'short.nii' followed by 16 bytes of payload, and a direct array_from_file call with shape (220,)*3, int8, 260 expected bytes against a 352-byte stream. The fix adds a _short_read_message helper and, for uncompressed streams only, seeks to end-of-file before allocation and raises OSError when the available bytes are less than the claimed size, falling back to the post-read check when a file-like object lacks seek/tell. Compressed streams are deliberately excluded from the up-front check (it would require decompressing the whole file) and instead surface the short-read OSError when the data is read, as the added test_array_from_file_short_compressed shows.

Know when Nibabel gets its next vulnerability

  • 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 (VulDB) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

A crafted file parsed by the library triggers only memory exhaustion, so C:N/I:N and A:L; AV:N/PR:N/UI:N retained per the source vector assuming a service ingests the file.

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

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

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
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

A security vulnerability has been detected in nipy nibabel up to 5.4.2. The affected element is the function array_from_file of the file nibabel/volumeutils.py of the component Header Handler. The manipulation leads to uncontrolled memory allocation. The attack is possible to be carried out remotely. The pull request to fix this issue awaits acceptance.

Threat Intelligence Overview

Prevalence
Low
niche neuroimaging Python library, research-focused rather than enterprise footprint
Data Quality
5 sources
Confidence: Medium

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 N/A
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· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

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

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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