{"id":"CVE-2025-46333","aliases":["CVE-2025-46333"],"related":[],"kind":"vulnerability","state":"published","title":"z2d OOB composition could lead to invalid memory access and corruption","summary":"z2d is a pure Zig 2D graphics library. Versions of z2d after `0.5.1` and up to and including `0.6.0`, when writing from one surface to another using `z2d.compositor.StrideCompositor.run`, and higher-level operations when the anti-aliasing mode is set to `.default` (such as `Context.fill`, `Context.stroke`, `painter.fill`, and `painter.stroke`), the source surface can be completely out-of-bounds on the x-axis, but not on the y-axis, by way of a negative offset. This results in an overflow of the value controlling the length of the stride. In non-safe optimization modes (consumers compiling with `ReleaseFast` or `ReleaseSmall`), this could potentially lead to invalid memory accesses or corruption.\n\nThis issue is patched in version `0.6.1`. Users on an untagged version after `v0.5.1` and before `v0.6.1` are advised to update to address the vulnerability. Those still on Zig `0.13.0` are recommended to downgrade to `v0.5.1`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"z2d is a pure Zig 2D graphics library. Versions of z2d after `0.5.1` and up to and including `0.6.0`, when writing from one surface to another using `z2d.compositor.StrideCompositor.run`, and higher-level operations when the anti-aliasing mode is set to `.default` (such as `Context.fill`, `Context.stroke`, `painter.fill`, and `painter.stroke`), the source surface can be completely out-of-bounds on the x-axis, but not on the y-axis, by way of a negative offset. This results in an overflow of the value controlling the length of the stride. In non-safe optimization modes (consumers compiling with `ReleaseFast` or `ReleaseSmall`), this could potentially lead to invalid memory accesses or corruption.\n\nThis issue is patched in version `0.6.1`. Users on an untagged version after `v0.5.1` and before `v0.6.1` are advised to update to address the vulnerability. Those still on Zig `0.13.0` are recommended to downgrade to `v0.5.1`.","source":"cvelist"},{"lang":"es","text":"z2d es una librería de gráficos Zig 2D pura. En la versión 0.6.0, al escribir de una superficie a otra usando `z2d.compositor.StrideCompositor.run`, la superficie de origen puede estar completamente fuera de los límites en el eje x (pero no en el eje y) debido a un desplazamiento negativo. Esto provoca un desbordamiento del valor que controla la longitud de la zancada. En modos de optimización no seguros (consumidores que compilan con `ReleaseFast` o `ReleaseSmall`), esto podría provocar accesos no válidos a memoria o corrupción. Este problema se solucionó en la versión 0.6.1.","source":"nvd"}],"published":"2025-04-25T20:20:22.202Z","modified":"2026-06-17T09:26:15.190Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":7.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":7.3,"rating":"HIGH"}],"cwes":["CWE-119","CWE-122","CWE-190"],"affected":[{"ranges":[{"version":"> 0.5.1, <= 0.6.0","status":"affected"}],"vendor":"vancluever","product":"z2d","source":"cvelist"}],"references":[{"url":"https://github.com/vancluever/z2d/security/advisories/GHSA-mm4c-p35v-7hx3","tags":["x-refsource-confirm"],"sources":["cvelist","nvd"]},{"url":"https://github.com/vancluever/z2d/issues/104","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/vancluever/z2d/issues/105","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-04-25T21:36:42.840Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-46333","url":"https://www.cve.org/CVERecord?id=CVE-2025-46333","licence":"CVE Terms of Use","modified":"2025-04-28T14:17:45.653Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-46333","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46333","licence":"Public domain","modified":"2026-06-17T09:26:15.190Z"}],"updatedAt":"2026-11-25T22:58:56.938Z","epss":{"score":0.00185,"percentile":0.08431,"date":"2026-12-01T12:00:22.000Z"}}