Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

emcconville/wand
master @ 9b2b080
7
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Denial of Service: 5 prior fixes. Scrutinize any change in this area.
wand/drawing.py: most-fixed (3 issues). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Out-of-bounds Write: Pixel array importing and exporting APIs can trigger out-of-bounds writes or reads in the underlying ImageMagick C library if the input data length is not strictly validated against the expected image dimensions. Developers must ensure that size validation is enforced before any native buffer copy.
Memory Corruption: Mismatched ctypes structures (such as CCObjectInfo) relative to the version of the underlying ImageMagick library can cause memory corruption during memmove operations. Accurate struct definitions must be synchronized with native library changes.
Denial of Service: The Drawing API has suffered from several memory leaks involving native PixelWand allocations, dynamically-allocated char buffers, and query results. Failing to explicitly free these resources or use auto-relinquishing wrappers leads to rapid memory exhaustion.