{"answers":{"affected":"","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42146 exists.","fix":"Apply the vendor's patch.","what":"CVE-2026-42146 is a medium-severity denial of service vulnerability in GreycLab CImg, published on 4 May 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-42146 and fix it if it is affected.\n\nWhat it is: CVE-2026-42146 is a medium-severity denial of service vulnerability in GreycLab CImg, published on 4 May 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42146 exists.\n\nAffected product: GreycLab CImg. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-42146/ (Markdown: https://insights.sbomify.com/CVE-2026-42146/index.md)","id":"CVE-2026-42146","markdown":"https://insights.sbomify.com/CVE-2026-42146/index.md","name":"CVE-2026-42146","record":{"aliases":["DEBIAN-CVE-2026-42146","GHSA-g54r-qmgx-c6fv","UBUNTU-CVE-2026-42146"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"C++ image processing library","requires_auth":"none","summary":"Attackers can crash applications using CImg by providing crafted BMP files with large color counts, causing uncontrolled memory allocation.","user_interaction":"required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-789","name":"Memory Allocation with Excessive Size Value"}],"description":"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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"CImg Library: Uncontrolled memory allocation via nb_colors field in _load_bmp","id":"CVE-2026-42146","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":0,"n_references":4,"next":{"headline":"Coolify: SSRF via S3 Storage Endpoint in testConnection()","id":"CVE-2026-42147"},"packages":[],"prev":{"headline":"Coolify: File Upload Without Type or Size Validation in Database Backup Restore","id":"CVE-2026-42145"},"products":["CImg"],"published":"2026-05-04","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-05-06","vendors":["GreycLab"]},"summary":"Attackers can crash applications using CImg by providing crafted BMP files with large color counts, causing uncontrolled memory allocation.","url":"https://insights.sbomify.com/CVE-2026-42146/"}