Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
Vulnerability Details :

CVE-2026-42146

Summary
Assigner-GitHub_M
Assigner Org ID-a0819718-46f1-4df5-94e2-005712e83aaa
Published At-04 May, 2026 | 17:53
Updated At-06 May, 2026 | 13:44
Rejected At-
Credits

CImg Library: Uncontrolled memory allocation via nb_colors field in _load_bmp

CImg Library is a C++ library for image processing. Prior to commit c3aacf5, the nb_colors field read from the BMP file header is used directly to compute an allocation size without validating it against the remaining file size. A crafted BMP file with a large nb_colors value triggers an out-of-memory condition, crashing any application that uses CImg to load untrusted BMP files. This issue has been patched via commit c3aacf5.

Vendors
-
Not available
Products
-
Metrics (CVSS)
VersionBase scoreBase severityVector
Weaknesses
Attack Patterns
Solution/Workaround
References
HyperlinkResource Type
EPSS History
Score
Latest Score
-
N/A
No data available for selected date range
Percentile
Latest Percentile
-
N/A
No data available for selected date range
Stakeholder-Specific Vulnerability Categorization (SSVC)
▼Common Vulnerabilities and Exposures (CVE)
cve.org
Assigner:GitHub_M
Assigner Org ID:a0819718-46f1-4df5-94e2-005712e83aaa
Published At:04 May, 2026 | 17:53
Updated At:06 May, 2026 | 13:44
Rejected At:
▼CVE Numbering Authority (CNA)
CImg Library: Uncontrolled memory allocation via nb_colors field in _load_bmp

CImg Library is a C++ library for image processing. Prior to commit c3aacf5, the nb_colors field read from the BMP file header is used directly to compute an allocation size without validating it against the remaining file size. A crafted BMP file with a large nb_colors value triggers an out-of-memory condition, crashing any application that uses CImg to load untrusted BMP files. This issue has been patched via commit c3aacf5.

Affected Products
Vendor
GreycLab
Product
CImg
Versions
Affected
  • < c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3
Problem Types
TypeCWE IDDescription
CWECWE-789CWE-789: Memory Allocation with Excessive Size Value
Type: CWE
CWE ID: CWE-789
Description: CWE-789: Memory Allocation with Excessive Size Value
Metrics
VersionBase scoreBase severityVector
3.15.5MEDIUM
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Version: 3.1
Base score: 5.5
Base severity: MEDIUM
Vector:
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://github.com/GreycLab/CImg/security/advisories/GHSA-g54r-qmgx-c6fv
x_refsource_CONFIRM
https://github.com/GreycLab/CImg/issues/477
x_refsource_MISC
https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3
x_refsource_MISC
https://github.com/GreycLab/CImg/releases/tag/v.3.7.5
x_refsource_MISC
Hyperlink: https://github.com/GreycLab/CImg/security/advisories/GHSA-g54r-qmgx-c6fv
Resource:
x_refsource_CONFIRM
Hyperlink: https://github.com/GreycLab/CImg/issues/477
Resource:
x_refsource_MISC
Hyperlink: https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3
Resource:
x_refsource_MISC
Hyperlink: https://github.com/GreycLab/CImg/releases/tag/v.3.7.5
Resource:
x_refsource_MISC
▼Authorized Data Publishers (ADP)
CISA ADP Vulnrichment
Affected Products
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://github.com/GreycLab/CImg/issues/477
exploit
Hyperlink: https://github.com/GreycLab/CImg/issues/477
Resource:
exploit
Information is not available yet
▼National Vulnerability Database (NVD)
nvd.nist.gov
Source:security-advisories@github.com
Published At:04 May, 2026 | 18:16
Updated At:06 May, 2026 | 15:16

CImg Library is a C++ library for image processing. Prior to commit c3aacf5, the nb_colors field read from the BMP file header is used directly to compute an allocation size without validating it against the remaining file size. A crafted BMP file with a large nb_colors value triggers an out-of-memory condition, crashing any application that uses CImg to load untrusted BMP files. This issue has been patched via commit c3aacf5.

CISA Catalog
Date AddedDue DateVulnerability NameRequired Action
N/A
Date Added: N/A
Due Date: N/A
Vulnerability Name: N/A
Required Action: N/A
Metrics
TypeVersionBase scoreBase severityVector
Secondary3.15.5MEDIUM
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Type: Secondary
Version: 3.1
Base score: 5.5
Base severity: MEDIUM
Vector:
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
CPE Matches

Weaknesses
CWE IDTypeSource
CWE-789Secondarysecurity-advisories@github.com
CWE ID: CWE-789
Type: Secondary
Source: security-advisories@github.com
Evaluator Description

Evaluator Impact

Evaluator Solution

Vendor Statements

References
HyperlinkSourceResource
https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3security-advisories@github.com
N/A
https://github.com/GreycLab/CImg/issues/477security-advisories@github.com
N/A
https://github.com/GreycLab/CImg/releases/tag/v.3.7.5security-advisories@github.com
N/A
https://github.com/GreycLab/CImg/security/advisories/GHSA-g54r-qmgx-c6fvsecurity-advisories@github.com
N/A
https://github.com/GreycLab/CImg/issues/477134c704f-9b21-4f2e-91b3-4a467353bcc0
N/A
Hyperlink: https://github.com/GreycLab/CImg/commit/c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3
Source: security-advisories@github.com
Resource: N/A
Hyperlink: https://github.com/GreycLab/CImg/issues/477
Source: security-advisories@github.com
Resource: N/A
Hyperlink: https://github.com/GreycLab/CImg/releases/tag/v.3.7.5
Source: security-advisories@github.com
Resource: N/A
Hyperlink: https://github.com/GreycLab/CImg/security/advisories/GHSA-g54r-qmgx-c6fv
Source: security-advisories@github.com
Resource: N/A
Hyperlink: https://github.com/GreycLab/CImg/issues/477
Source: 134c704f-9b21-4f2e-91b3-4a467353bcc0
Resource: N/A

Change History

0
Information is not available yet

Similar CVEs

2Records found

CVE-2021-31811
Matching Score-4
Assigner-Apache Software Foundation
ShareView Details
Matching Score-4
Assigner-Apache Software Foundation
CVSS Score-5.5||MEDIUM
EPSS-0.52% / 66.97%
||
7 Day CHG~0.00%
Published-12 Jun, 2021 | 09:45
Updated-03 Aug, 2024 | 23:10
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available
A carefully crafted PDF file can trigger an OutOfMemory-Exception while loading a tiny file

In Apache PDFBox, a carefully crafted PDF file can trigger an OutOfMemory-Exception while loading the file. This issue affects Apache PDFBox version 2.0.23 and prior 2.0.x versions.

Action-Not Available
Vendor-The Apache Software FoundationFedora ProjectOracle Corporation
Product-banking_supply_chain_financeprimavera_unifierpdfboxflexcube_universal_bankingcommunications_messaging_serverfedoraoutside_in_technologybanking_corporate_lending_process_managementbanking_credit_facilities_process_managementbanking_treasury_managementretail_customer_management_and_segmentation_foundationbanking_trade_financeApache PDFBox
CWE ID-CWE-789
Memory Allocation with Excessive Size Value
CWE ID-CWE-770
Allocation of Resources Without Limits or Throttling
CVE-2021-27906
Matching Score-4
Assigner-Apache Software Foundation
ShareView Details
Matching Score-4
Assigner-Apache Software Foundation
CVSS Score-5.5||MEDIUM
EPSS-0.65% / 70.88%
||
7 Day CHG~0.00%
Published-19 Mar, 2021 | 16:05
Updated-13 Feb, 2025 | 16:27
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available
A carefully crafted PDF file can trigger an OutOfMemory-Exception while loading the file

A carefully crafted PDF file can trigger an OutOfMemory-Exception while loading the file. This issue affects Apache PDFBox version 2.0.22 and prior 2.0.x versions.

Action-Not Available
Vendor-Fedora ProjectOracle CorporationThe Apache Software Foundation
Product-peoplesoft_enterprise_peopletoolsprimavera_unifierpdfboxcommunications_messaging_serveroutside_in_technologycommunications_session_report_managerbanking_trade_finance_process_managementbanking_supply_chain_financeflexcube_universal_bankinghyperion_financial_reportingfedoraretail_xstore_point_of_servicebanking_corporate_lending_process_managementwebcenter_siteshyperion_infrastructure_technologybanking_credit_facilities_process_managementbanking_virtual_account_managementbanking_treasury_managementretail_customer_management_and_segmentation_foundationApache PDFBox
CWE ID-CWE-789
Memory Allocation with Excessive Size Value
Details not found