{"api_version":"1","generated_at":"2026-07-21T22:57:33+00:00","cve":"CVE-2026-47667","urls":{"html":"https://cve.report/CVE-2026-47667","api":"https://cve.report/api/cve/CVE-2026-47667.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-47667","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-47667"},"summary":{"title":"CImg Library: Uncontrolled Memory Allocation and Memory Leak in `_load_analyze()` via Crafted NIfTI/Analyze Header","description":"CImg Library is a C++ library for image processing. Prior to version 4.0.0 in `_load_analyze()`, the header_size field is read as an `unsigned int` from the first 4 bytes of an Analyze/NIfTI file and passed directly to `new unsigned char[header_size]` without being bounded against the actual file size. A value up to ~4 GB is accepted. If the subsequent `fread` returns `short`  as it will for any malformed file), the function throws a `CImgIOException` and the allocated buffer is never freed. A 6-byte crafted file is sufficient to trigger an allocation of ~1.3 GB per call, with the full allocation leaked on every error path. The issue is reachable via `load_analyze()` and the generic `load()` when the file extension is .hdr, .img, or .nii. Version 4.0.0 fixes the issue.","state":"PUBLISHED","assigner":"GitHub_M","published_at":"2026-07-21 20:17:01","updated_at":"2026-07-21 20:17:01"},"problem_types":["CWE-401","CWE-789","CWE-1284","CWE-401 CWE-401: Missing Release of Memory after Effective Lifetime","CWE-789 CWE-789: Memory Allocation with Excessive Size Value","CWE-1284 CWE-1284: Improper Validation of Specified Quantity in Input"],"metrics":[{"version":"3.1","source":"security-advisories@github.com","type":"Secondary","score":"7.5","severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.5","severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","data":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}}],"references":[{"url":"https://github.com/GreycLab/CImg/commit/6a69bf725ffd111a4c7dc61cc15e3661abd158ee","name":"https://github.com/GreycLab/CImg/commit/6a69bf725ffd111a4c7dc61cc15e3661abd158ee","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/GreycLab/CImg/issues/480","name":"https://github.com/GreycLab/CImg/issues/480","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/GreycLab/CImg/security/advisories/GHSA-rmfc-grgj-qwhv","name":"https://github.com/GreycLab/CImg/security/advisories/GHSA-rmfc-grgj-qwhv","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-47667","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47667","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"GreycLab","product":"CImg","version":"affected < 4.0.0","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"product":"CImg","vendor":"GreycLab","versions":[{"status":"affected","version":"< 4.0.0"}]}],"descriptions":[{"lang":"en","value":"CImg Library is a C++ library for image processing. Prior to version 4.0.0 in `_load_analyze()`, the header_size field is read as an `unsigned int` from the first 4 bytes of an Analyze/NIfTI file and passed directly to `new unsigned char[header_size]` without being bounded against the actual file size. A value up to ~4 GB is accepted. If the subsequent `fread` returns `short`  as it will for any malformed file), the function throws a `CImgIOException` and the allocated buffer is never freed. A 6-byte crafted file is sufficient to trigger an allocation of ~1.3 GB per call, with the full allocation leaked on every error path. The issue is reachable via `load_analyze()` and the generic `load()` when the file extension is .hdr, .img, or .nii. Version 4.0.0 fixes the issue."}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-401","description":"CWE-401: Missing Release of Memory after Effective Lifetime","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-789","description":"CWE-789: Memory Allocation with Excessive Size Value","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-1284","description":"CWE-1284: Improper Validation of Specified Quantity in Input","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-07-21T19:57:49.446Z","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","shortName":"GitHub_M"},"references":[{"name":"https://github.com/GreycLab/CImg/security/advisories/GHSA-rmfc-grgj-qwhv","tags":["x_refsource_CONFIRM"],"url":"https://github.com/GreycLab/CImg/security/advisories/GHSA-rmfc-grgj-qwhv"},{"name":"https://github.com/GreycLab/CImg/issues/480","tags":["x_refsource_MISC"],"url":"https://github.com/GreycLab/CImg/issues/480"},{"name":"https://github.com/GreycLab/CImg/commit/6a69bf725ffd111a4c7dc61cc15e3661abd158ee","tags":["x_refsource_MISC"],"url":"https://github.com/GreycLab/CImg/commit/6a69bf725ffd111a4c7dc61cc15e3661abd158ee"}],"source":{"advisory":"GHSA-rmfc-grgj-qwhv","discovery":"UNKNOWN"},"title":"CImg Library: Uncontrolled Memory Allocation and Memory Leak in `_load_analyze()` via Crafted NIfTI/Analyze Header"}},"cveMetadata":{"assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","assignerShortName":"GitHub_M","cveId":"CVE-2026-47667","datePublished":"2026-07-21T19:57:49.446Z","dateReserved":"2026-05-19T21:10:38.797Z","dateUpdated":"2026-07-21T19:57:49.446Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-07-21 20:17:01","lastModifiedDate":"2026-07-21 20:17:01","problem_types":["CWE-401","CWE-789","CWE-1284","CWE-401 CWE-401: Missing Release of Memory after Effective Lifetime","CWE-789 CWE-789: Memory Allocation with Excessive Size Value","CWE-1284 CWE-1284: Improper Validation of Specified Quantity in Input"],"metrics":{"cvssMetricV31":[{"source":"security-advisories@github.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"47667","Ordinal":"1","Title":"CImg Library: Uncontrolled Memory Allocation and Memory Leak in ","CVE":"CVE-2026-47667","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"47667","Ordinal":"1","NoteData":"CImg Library is a C++ library for image processing. Prior to version 4.0.0 in `_load_analyze()`, the header_size field is read as an `unsigned int` from the first 4 bytes of an Analyze/NIfTI file and passed directly to `new unsigned char[header_size]` without being bounded against the actual file size. A value up to ~4 GB is accepted. If the subsequent `fread` returns `short`  as it will for any malformed file), the function throws a `CImgIOException` and the allocated buffer is never freed. A 6-byte crafted file is sufficient to trigger an allocation of ~1.3 GB per call, with the full allocation leaked on every error path. The issue is reachable via `load_analyze()` and the generic `load()` when the file extension is .hdr, .img, or .nii. Version 4.0.0 fixes the issue.","Type":"Description","Title":"CImg Library: Uncontrolled Memory Allocation and Memory Leak in "}]}}}