Description
Decoding a paletted BMP file with an out-of-range palette index results in a panic when accessing pixels in the invalid image.
Published: 2026-05-29
Score: 5.3 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A malformed BMP file can contain a palette index that exceeds the number of defined palette entries. When the golang.org/x/image/bmp package reads the pixel data, it unconditionally accesses the palette with the supplied index, causing an out‑of‑bounds read that triggers a panic. The panic terminates the decoding routine and, unless the host application recovers, results in the entire process exiting. This flaw represents an improper input validation weakness that leads to a denial of service rather than memory corruption or code execution. Based on the description, it is inferred that the attacker can exploit this by supplying a crafted BMP file containing an out-of-range palette index; the attack vector involves delivering such a file to the decoding routine.

Affected Systems

The vulnerability is confined to the golang.org/x/image repository’s bmp package. No specific version numbers are listed in the CNA data, so any application that imports this package and parses BMP files may be susceptible until the issue is patched.

Risk and Exploitability

The CVSS score of 5.3 marks the flaw as moderate severity. Because no EPSS score is available, the likelihood of exploitation is unknown, but the attack path is straightforward: feeding a crafted BMP that includes an out‑of‑range palette index can force the application to panic. In services that accept external images, such as web servers or image processors, an attacker could repeatedly supply malformed BMPs to cause service outages, raising the risk to availability. The vulnerability is not listed in the CISA KEV catalog, indicating no publicly known exploitation to date.

Generated by OpenCVE AI on May 29, 2026 at 23:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade golang.org/x/image to the latest release that adds bounds checking for palette indices.
  • Validate any BMP data before decoding to ensure that all palette indices are less than the palette size, rejecting or correcting files that violate this rule.
  • Wrap calls to the bmp decoding routine in a recover block to capture panics, log the event, and prevent the entire process from terminating on malformed images.

Generated by OpenCVE AI on May 29, 2026 at 23:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 29 May 2026 22:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Fri, 29 May 2026 20:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Fri, 29 May 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 29 May 2026 19:30:00 +0000

Type Values Removed Values Added
Description Decoding a paletted BMP file with an out-of-range palette index results in a panic when accessing pixels in the invalid image.
Title Panic when reading out of bound palette index in golang.org/x/image/bmp
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: Go

Published:

Updated: 2026-05-29T19:51:38.147Z

Reserved: 2026-04-28T00:21:12.791Z

Link: CVE-2026-42500

cve-icon Vulnrichment

Updated: 2026-05-29T19:51:33.444Z

cve-icon NVD

Status : Received

Published: 2026-05-29T20:16:23.627

Modified: 2026-05-29T20:16:23.627

Link: CVE-2026-42500

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-29T23:30:10Z

Weaknesses

No weakness.