| 0 |
|
| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
| url |
VCID-a2qm-vkc3-qkd5 |
| vulnerability_id |
VCID-a2qm-vkc3-qkd5 |
| summary |
ImageMagick has Undefined Behavior (function-type-mismatch) in CloneSplayTree
## Summary
- **Target:** ImageMagick (commit `ecc9a5eb456747374bae8e07038ba10b3d8821b3`)
- **Type:** Undefined Behavior (function-type-mismatch) in splay tree cloning callback
- **Impact:** Deterministic abort under UBSan (DoS in sanitizer builds). No crash in a non-sanitized build; likely low security impact.
- **Trigger:** Minimal **2-byte** input parsed via MagickWand, then coalescing.
## Environment
OS: macOS (Apple Silicon/arm64)
Homebrew clang version 20.1.8
Target: arm64-apple-darwin24.5.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/20.1.8/bin
Configuration file: /opt/homebrew/etc/clang/arm64-apple-darwin24.cfg
Homebrew ImageMagick: `magick -version` → `ImageMagick 7.1.2-0 Q16-HDRI aarch64`
pkg-config: `MagickWand-7.Q16HDRI` version `7.1.2`
Library configure flags (capsule build):
./configure --disable-shared --enable-static --without-modules --without-magick-plus-plus --disable-openmp --without-perl --without-x --with-png=yes --without-jpeg --without-tiff --without-xml --without-lqr --without-gslib
Harness compile flags:
-fsanitize=fuzzer,address,undefined -fno-omit-frame-pointer
pkg-config cflags/libs supplied:
-I<...>/include/ImageMagick-7
-DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32
and linked against MagickWand-7.Q16HDRI and MagickCore-7.Q16HDRI
Sanitizer runtime:
ASan+UBSan defaults. Repro also with `UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1`
## PoC
- **Bytes (hex):** `1c 02`
- **Base64:** `HAI=`
- **sha256 (optional):** <fill in>
## Reproduction
Create PoC:
`printf '\x1c\x02' > poc.bin`
Option A: libFuzzer harness
- Run once: `./harness_ImageMagick_... -runs=1 ./poc.bin`
- Expected: UBSan aborts with function-type-mismatch at `MagickCore/splay-tree.c:372:43`.
Option B: standalone reproducer (C)
- Compile (ensure `PKG_CONFIG_PATH` points to your ImageMagick if needed):
/opt/homebrew/opt/llvm/bin/clang -g -O1 -fsanitize=address,undefined $(/opt/homebrew/bin/pkg-config --cflags MagickWand-7.Q16HDRI) repro.c -o repro $(/opt/homebrew/bin/pkg-config --libs MagickWand-7.Q16HDRI)
- Run:
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 ./repro ./poc.bin
Observed output (excerpt)
MagickCore/splay-tree.c:372:43: runtime error: call to function ConstantString through pointer to incorrect function type 'void *(*)(void *)'
string.c:680: note: ConstantString defined here
#0 CloneSplayTree splay-tree.c:372
#1 CloneImageProfiles profile.c:159
#2 CloneImage image.c:832
#3 CoalesceImages layer.c:269
#4 MagickCoalesceImages magick-image.c:1665
#5 main repro.c:XX
Root cause
The splay tree clone callback expects a function pointer of type `void *(*)(void *)`. ConstantString has a different signature (`char *ConstantString(const char *)`). Calling through the mismatched function type is undefined behavior in C and triggers UBSan’s function-type-mismatch.
The path is exercised during coalescing: CloneImage → CloneImageProfiles → CloneSplayTree.
Scope
Reproduces with a minimal, sanitizer-instrumented, PNG-enabled build and delegates disabled (policy.xml), suggesting the issue is in MagickCore rather than external delegates.
Suggested fix (sketch)
Use a wrapper that matches the expected callback prototype, or adjust the splay-tree callback typedef for const-correctness. For example:
static void *CloneStringShim(const void *p) {
return (void *) ConstantString((const char *) p);
}
/* When setting splay-tree clone_value, use CloneStringShim instead of ConstantString. */
Alternatively, update the clone callback typedefs to use const void* consistently (and return void*) and ensure callers pass a correctly typed wrapper.
Artifacts
Minimised PoC: attached (poc.bin, 2 bytes; base64 HAI=)
Harness source and exact build command (attached)
Full UBSan trace (attached)
Commit SHA and configure flags (above)
Credits
Discovered by: Lumina Mescuwa
Method: libFuzzer + UBSan
Verification
- UBSan build: Reproduces with `halt_on_error=1`; aborts at `MagickCore/splay-tree.c:372`.
- Non-sanitized Homebrew build (macOS arm64, clang 20.1.8): No crash; repro completes silently. |
| references |
| 0 |
|
| 1 |
| reference_url |
https://api.first.org/data/v1/epss?cve=CVE-2025-55160 |
| reference_id |
|
| reference_type |
|
| scores |
| 0 |
| value |
0.00041 |
| scoring_system |
epss |
| scoring_elements |
0.12321 |
| published_at |
2026-04-16T12:55:00Z |
|
| 1 |
| value |
0.00041 |
| scoring_system |
epss |
| scoring_elements |
0.12414 |
| published_at |
2026-04-13T12:55:00Z |
|
| 2 |
| value |
0.00041 |
| scoring_system |
epss |
| scoring_elements |
0.12454 |
| published_at |
2026-04-12T12:55:00Z |
|
| 3 |
| value |
0.00041 |
| scoring_system |
epss |
| scoring_elements |
0.12492 |
| published_at |
2026-04-11T12:55:00Z |
|
| 4 |
| value |
0.00041 |
| scoring_system |
epss |
| scoring_elements |
0.1252 |
| published_at |
2026-04-09T12:55:00Z |
|
| 5 |
| value |
0.00041 |
| scoring_system |
epss |
| scoring_elements |
0.1247 |
| published_at |
2026-04-08T12:55:00Z |
|
| 6 |
| value |
0.00041 |
| scoring_system |
epss |
| scoring_elements |
0.1239 |
| published_at |
2026-04-07T12:55:00Z |
|
| 7 |
| value |
0.00041 |
| scoring_system |
epss |
| scoring_elements |
0.1254 |
| published_at |
2026-04-02T12:55:00Z |
|
| 8 |
| value |
0.00041 |
| scoring_system |
epss |
| scoring_elements |
0.12582 |
| published_at |
2026-04-04T12:55:00Z |
|
| 9 |
| value |
0.00044 |
| scoring_system |
epss |
| scoring_elements |
0.13574 |
| published_at |
2026-04-24T12:55:00Z |
|
| 10 |
| value |
0.00044 |
| scoring_system |
epss |
| scoring_elements |
0.1349 |
| published_at |
2026-04-18T12:55:00Z |
|
| 11 |
| value |
0.00044 |
| scoring_system |
epss |
| scoring_elements |
0.13561 |
| published_at |
2026-04-21T12:55:00Z |
|
|
| url |
https://api.first.org/data/v1/epss?cve=CVE-2025-55160 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
|
| fixed_packages |
|
| aliases |
CVE-2025-55160, GHSA-6hgw-6x87-578x
|
| risk_score |
3.1 |
| exploitability |
0.5 |
| weighted_severity |
6.2 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-a2qm-vkc3-qkd5 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
| url |
VCID-jc5m-7rvc-2qg6 |
| vulnerability_id |
VCID-jc5m-7rvc-2qg6 |
| summary |
ImageMagick has a heap-buffer-overflow in NewXMLTree which could result in crash
The NewXMLTree method contains a bug that could result in a crash due to an out of write bounds of a single zero byte. |
| references |
| 0 |
|
| 1 |
| reference_url |
https://api.first.org/data/v1/epss?cve=CVE-2026-32636 |
| reference_id |
|
| reference_type |
|
| scores |
| 0 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.04277 |
| published_at |
2026-04-18T12:55:00Z |
|
| 1 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.04268 |
| published_at |
2026-04-16T12:55:00Z |
|
| 2 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.04297 |
| published_at |
2026-04-13T12:55:00Z |
|
| 3 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.04318 |
| published_at |
2026-04-12T12:55:00Z |
|
| 4 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.0426 |
| published_at |
2026-04-02T12:55:00Z |
|
| 5 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.0434 |
| published_at |
2026-04-09T12:55:00Z |
|
| 6 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.04324 |
| published_at |
2026-04-08T12:55:00Z |
|
| 7 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.04293 |
| published_at |
2026-04-07T12:55:00Z |
|
| 8 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.04281 |
| published_at |
2026-04-04T12:55:00Z |
|
| 9 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.04332 |
| published_at |
2026-04-11T12:55:00Z |
|
| 10 |
| value |
0.00019 |
| scoring_system |
epss |
| scoring_elements |
0.05128 |
| published_at |
2026-04-24T12:55:00Z |
|
| 11 |
| value |
0.00019 |
| scoring_system |
epss |
| scoring_elements |
0.05103 |
| published_at |
2026-04-21T12:55:00Z |
|
|
| url |
https://api.first.org/data/v1/epss?cve=CVE-2026-32636 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
|
| fixed_packages |
|
| aliases |
CVE-2026-32636, GHSA-gc62-2v5p-qpmp
|
| risk_score |
3.4 |
| exploitability |
0.5 |
| weighted_severity |
6.8 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-jc5m-7rvc-2qg6 |
|
| 11 |
|
| 12 |
| url |
VCID-tt6z-t31v-dkdd |
| vulnerability_id |
VCID-tt6z-t31v-dkdd |
| summary |
ImageMagick has an Out-of-bounds Write via InterpretImageFilename
Due to an incorrect return value on certain platforms a pointer is incremented past the end of a buffer that is on the stack and that could result in an out of bounds write.
```
=================================================================
==48558==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x00016b9b7490 at pc 0x0001046d48ac bp 0x00016b9b31d0 sp 0x00016b9b31c8
WRITE of size 1 at 0x00016b9b7490 thread T0
``` |
| references |
| 0 |
|
| 1 |
| reference_url |
https://api.first.org/data/v1/epss?cve=CVE-2026-33536 |
| reference_id |
|
| reference_type |
|
| scores |
| 0 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.04109 |
| published_at |
2026-04-02T12:55:00Z |
|
| 1 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.045 |
| published_at |
2026-04-21T12:55:00Z |
|
| 2 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.04429 |
| published_at |
2026-04-09T12:55:00Z |
|
| 3 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.04528 |
| published_at |
2026-04-24T12:55:00Z |
|
| 4 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.04378 |
| published_at |
2026-04-07T12:55:00Z |
|
| 5 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.04412 |
| published_at |
2026-04-08T12:55:00Z |
|
| 6 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.04423 |
| published_at |
2026-04-11T12:55:00Z |
|
| 7 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.04367 |
| published_at |
2026-04-18T12:55:00Z |
|
| 8 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.04359 |
| published_at |
2026-04-16T12:55:00Z |
|
| 9 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.04368 |
| published_at |
2026-04-04T12:55:00Z |
|
| 10 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.04391 |
| published_at |
2026-04-13T12:55:00Z |
|
| 11 |
| value |
0.00018 |
| scoring_system |
epss |
| scoring_elements |
0.04408 |
| published_at |
2026-04-12T12:55:00Z |
|
|
| url |
https://api.first.org/data/v1/epss?cve=CVE-2026-33536 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
|
| fixed_packages |
|
| aliases |
CVE-2026-33536, GHSA-8793-7xv6-82cf
|
| risk_score |
3.1 |
| exploitability |
0.5 |
| weighted_severity |
6.2 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-tt6z-t31v-dkdd |
|
| 13 |
|
| 14 |
|
| 15 |
| url |
VCID-zvq4-ybph-buga |
| vulnerability_id |
VCID-zvq4-ybph-buga |
| summary |
ImageMagick has an Out-of-Bounds write of a zero byte in its X11 display interaction
An out-of-bounds write of a zero byte exists in the X11 `display` interaction path that could lead to a crash. |
| references |
| 0 |
|
| 1 |
| reference_url |
https://api.first.org/data/v1/epss?cve=CVE-2026-33535 |
| reference_id |
|
| reference_type |
|
| scores |
| 0 |
| value |
0.00014 |
| scoring_system |
epss |
| scoring_elements |
0.02792 |
| published_at |
2026-04-09T12:55:00Z |
|
| 1 |
| value |
0.00014 |
| scoring_system |
epss |
| scoring_elements |
0.0274 |
| published_at |
2026-04-13T12:55:00Z |
|
| 2 |
| value |
0.00014 |
| scoring_system |
epss |
| scoring_elements |
0.02764 |
| published_at |
2026-04-04T12:55:00Z |
|
| 3 |
| value |
0.00014 |
| scoring_system |
epss |
| scoring_elements |
0.02744 |
| published_at |
2026-04-12T12:55:00Z |
|
| 4 |
| value |
0.00014 |
| scoring_system |
epss |
| scoring_elements |
0.02762 |
| published_at |
2026-04-11T12:55:00Z |
|
| 5 |
| value |
0.00014 |
| scoring_system |
epss |
| scoring_elements |
0.0277 |
| published_at |
2026-04-07T12:55:00Z |
|
| 6 |
| value |
0.00014 |
| scoring_system |
epss |
| scoring_elements |
0.02773 |
| published_at |
2026-04-08T12:55:00Z |
|
| 7 |
| value |
0.00014 |
| scoring_system |
epss |
| scoring_elements |
0.02735 |
| published_at |
2026-04-18T12:55:00Z |
|
| 8 |
| value |
0.00014 |
| scoring_system |
epss |
| scoring_elements |
0.02724 |
| published_at |
2026-04-16T12:55:00Z |
|
| 9 |
| value |
0.00017 |
| scoring_system |
epss |
| scoring_elements |
0.04197 |
| published_at |
2026-04-02T12:55:00Z |
|
| 10 |
| value |
5e-05 |
| scoring_system |
epss |
| scoring_elements |
0.00252 |
| published_at |
2026-04-24T12:55:00Z |
|
| 11 |
| value |
5e-05 |
| scoring_system |
epss |
| scoring_elements |
0.00253 |
| published_at |
2026-04-21T12:55:00Z |
|
|
| url |
https://api.first.org/data/v1/epss?cve=CVE-2026-33535 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
|
| fixed_packages |
|
| aliases |
CVE-2026-33535, GHSA-mw3m-pqr2-qv7c
|
| risk_score |
3.1 |
| exploitability |
0.5 |
| weighted_severity |
6.2 |
| resource_url |
http://public2.vulnerablecode.io/vulnerabilities/VCID-zvq4-ybph-buga |
|