CVE-2013-6393: Heap Based Buffer Overflow in libyaml

libyaml Updated 02 Oct 2025

Summary

31/08/2020
Yes i
Critical
Not published

CVE-2013-6393: Heap Based Buffer Overflow in libyaml. Affects libyaml versions < 0.2.3. Fixed in 0.2.3. How to fix ↓

Also tracked for

The same CVE-2013-6393 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libyaml is an npm package that provides a YAML parser and emitter library. It is used for parsing YAML tags in various applications. Versions 0.2.2 and earlier of libyaml depend on native libyaml version 0.1.5 or earlier. This dependency introduces a vulnerability that can lead to a heap-based buffer overflow when parsing YAML tags.

Vulnerability Detail

The vulnerability in libyaml is a heap-based buffer overflow. This means that an attacker can exploit a flaw in the code to overwrite data in the heap, potentially leading to a crash or arbitrary code execution. The vulnerability arises from the use of an outdated version of the native libyaml library. By parsing specially crafted YAML tags, an attacker can trigger the buffer overflow and exploit the vulnerability.

How To Fix

Minimum fixed version

0.2.3

This is the first release that contains the fix.

npm install libyaml@0.2.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update to the fixed version of libyaml to mitigate the risk.

Conclusion

In conclusion, libyaml versions 0.2.2 and earlier are vulnerable to a heap-based buffer overflow when parsing YAML tags. To mitigate this vulnerability, it is crucial to update to version 0.2.3 of libyaml. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for libyaml →

Share this vulnerability

FAQ

libyaml is an npm package that provides a YAML parser and emitter library. It is commonly used in applications that require parsing and handling YAML data.

A heap-based buffer overflow is a type of vulnerability where an attacker can overwrite data in the heap, potentially leading to a crash or arbitrary code execution.

This vulnerability can be exploited by parsing specially crafted YAML tags. By triggering the buffer overflow, an attacker can execute arbitrary code or cause a crash.

The impact of this vulnerability can vary depending on the application using libyaml. It can potentially lead to a crash or allow an attacker to execute arbitrary code.

To fix this vulnerability, update to version 0.2.3 of libyaml, which includes a fix for the heap-based buffer overflow.

Related vulnerabilities

Recent vulnerabilities recorded for libyaml.

How To Fix

Minimum fixed version

0.2.3

This is the first release that contains the fix.

npm install libyaml@0.2.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback