CVE-2024-26540
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library:...
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_load_analyze.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.8
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_load_analyze.
- Record
CVE-2024-26540- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-122
- Updated
- 2026-11-02
EUVDEUVD-2024-23805
7.8
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_load_analyze.
- Record
EUVD-2024-23805- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-c2c4-4544-w949
7.8
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library:...
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_load_analyze.
- Record
GHSA-c2c4-4544-w949- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-122
- Updated
- 2026-11-02
NVD
7.8
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_load_analyze.
- Record
CVE-2024-26540- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-122
- Updated
- 2026-11-02
OSV
7.8
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_load_analyze.
- Record
CVE-2024-26540- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2024-26540
7.8
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_load_analyze.
- Record
DEBIAN-CVE-2024-26540- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2024-26540
7.8
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_load_analyze.
- Record
UBUNTU-CVE-2024-26540- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2025-0169 No score
Updated cimg packages fix security vulnerability
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_load_analyze. (CVE-2024-26540)
- Record
MGASA-2025-0169- Updated
- 2026-11-02
OSVUSN-7437-1 No score
cimg vulnerabilities
It was discovered that the CImg library did not properly check the size of images before loading them. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 22.04 LTS. (CVE-2022-1325)
It was discovered that the CImg library did not correctly handle certain memory operations, which could lead to a buffer overflow. An attacker could possibly use this issue to execute arbitrary code or cause a denial of service. (CVE-2024-26540)
- Record
USN-7437-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
cimgDebian:12 |
All versions, plus listed versions 3.2.1+dfsg-13.2.1+dfsg-23.5.0+dfsg-13.5.2+dfsg-13.5.2+dfsg-24.0.4+dfsg-1 |
None known |
cimgDebian:13 |
before 3.5.0+dfsg-1 | 3.5.0+dfsg-1 |
cimgDebian:14 |
before 3.5.0+dfsg-1 | 3.5.0+dfsg-1 |
cimgMageia:9 |
before 3.2.5-1.1.mga9 | 3.2.5-1.1.mga9 |
cimgUbuntu:16.04:LTS |
All versions, plus listed versions 1.6.4+dfsg-1build11.6.5+dfsg-1 |
None known |
cimgUbuntu:Pro:18.04:LTS |
before 1.7.9+dfsg-2ubuntu0.18.04.2+esm1, plus listed versions 1.7.9+dfsg-21.7.9+dfsg-2build11.7.9+dfsg-2ubuntu0.18.04.11.7.9+dfsg-2ubuntu0.18.04.2 |
1.7.9+dfsg-2ubuntu0.18.04.2+esm1 |
cimgUbuntu:20.04:LTS |
All versions, plus listed versions 2.4.5+dfsg-1 |
None known |
cimgUbuntu:Pro:22.04:LTS |
before 2.9.4+dfsg-3ubuntu0.1~esm1, plus listed versions 2.9.4+dfsg-22.9.4+dfsg-3 |
2.9.4+dfsg-3ubuntu0.1~esm1 |
cimgUbuntu:Pro:24.04:LTS |
before 3.2.1+dfsg-1ubuntu0.24.04.1~esm1, plus listed versions 3.2.1+dfsg-1 |
3.2.1+dfsg-1ubuntu0.24.04.1~esm1 |
cimgUbuntu:Pro:18.04:LTS From an advisory covering 2 CVEs |
before 1.7.9+dfsg-2ubuntu0.18.04.2+esm1, plus listed versions 1.7.9+dfsg-21.7.9+dfsg-2build11.7.9+dfsg-2ubuntu0.18.04.11.7.9+dfsg-2ubuntu0.18.04.2 |
1.7.9+dfsg-2ubuntu0.18.04.2+esm1 |
cimgUbuntu:Pro:22.04:LTS From an advisory covering 2 CVEs |
before 2.9.4+dfsg-3ubuntu0.1~esm1, plus listed versions 2.9.4+dfsg-22.9.4+dfsg-3 |
2.9.4+dfsg-3ubuntu0.1~esm1 |
cimgUbuntu:Pro:24.04:LTS From an advisory covering 2 CVEs |
before 3.2.1+dfsg-1ubuntu0.24.04.1~esm1, plus listed versions 3.2.1+dfsg-1 |
3.2.1+dfsg-1ubuntu0.24.04.1~esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-26540 is a high vulnerability (CVSS 7.8) in Cimg, published March 15, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.31%, the 24th percentile. Fixed in cimg 3.5.0+dfsg-1.
References
github.com/GreycLab/CImg/issues/403
nvd.nist.gov/vuln/detail/CVE-2024-26540
github.com/advisories/GHSA-c2c4-4544-w949
github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26540.json
security-tracker.debian.org/tracker/CVE-2024-26540
advisories.mageia.org/MGASA-2025-0169.html
Show 9 moreShow less
bugs.mageia.org/show_bug.cgi?id=34214
ubuntu.com/security/notices/USN-7437-1
ubuntu.com/security/CVE-2024-26540
github.com/GreycLab/CImg/commit/6a97a5209987e60fcce293ea102a068a88085098
github.com/GreycLab/CImg/commit/c214dfee22a3fedcfae48fba7645f7a819cc9385
github.com/GreycLab/CImg/commit/ec6a1f2183620a90b4dcf456813e597ade791dc6
github.com/GreycLab/CImg/commit/cb9c5518905ea370954a59903ff747650c6edd40
cve.org/CVERecord?id=CVE-2024-26540
ubuntu.com/security/CVE-2022-1325