Vulnerabilities in pkg:npm/libyaml
PACKAGECVE-2013-6393 is a CRITICAL heap based buffer overflow vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Libyaml libraries in the npm ecosystem. The issue involves heap based buffer overflow in libyaml. Remediation is available by upgrading affected packages to version 0.2.3.
pkg:npm/libyaml
Vulnerability advisories affecting package pkg:npm/libyaml. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-m75h-cghq-c8h5 | CVE-2013-6393 | CRITICAL | Heap Based Buffer Overflow in libyaml |
CVE-2013-6393 at a Glance
How to Fix CVE-2013-6393
To remediate this vulnerability, upgrade all affected Libyaml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install libyaml@0.2.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls libyaml
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2013-6393, inspect your project dependencies using npm:
npm ls libyaml
Analyze the terminal output to locate any version of Libyaml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.3), your application is affected.
Note: The npm ls libyaml command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Libyaml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2013-6393 Affected Libyaml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
libyaml
|
npm |
< 0.2.3
|
0.2.3
|
References
Frequently Asked Questions
What is CVE-2013-6393?
Which Libyaml versions are affected?
What version fixes CVE-2013-6393?
Is libyaml affected?
What CWE is associated with CVE-2013-6393?
How can I check npm dependencies for CVE-2013-6393?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m75h-cghq-c8h5",
"modified" : "2021-09-23T20:56:01Z",
"published" : "2020-08-31T22:51:50Z",
"aliases" : [ "CVE-2013-6393" ],
"summary" : "Heap Based Buffer Overflow in libyaml",
"details" : "Versions 0.2.2 and earlier depend on native libyaml version 0.1.5 or earlier. As such, they are affected by a heap-based buffer overflow vulnerability that may result in a crash or arbitrary code execution when parsing YAML tags.\n\n\n\n\n\n## Recommendation\n\n- Update to version 0.2.3 that includes a version of LibYAML that contains a fix for this issue.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "libyaml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-6393"
}, {
"type" : "PACKAGE",
"url" : "https://bitbucket.org/xi/libyaml"
}, {
"type" : "WEB",
"url" : "https://bitbucket.org/xi/libyaml/commits/bce8b60f0b9af69fa9fab3093d0a41ba243de048"
}, {
"type" : "WEB",
"url" : "https://bitbucket.org/xi/libyaml/commits/tag/0.1.5"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/attachment.cgi?id=847926&action=diff"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1033990"
}, {
"type" : "WEB",
"url" : "https://puppet.com/security/cve/cve-2013-6393"
}, {
"type" : "WEB",
"url" : "https://support.apple.com/kb/HT6536"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20140302205713/http://www.securityfocus.com/bid/65258"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20150523055002/http://www.mandriva.com/en/support/security/advisories/advisory/MDVSA-2015:060/?name=MDVSA-2015:060"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/21"
}, {
"type" : "WEB",
"url" : "http://advisories.mageia.org/MGASA-2014-0040.html"
}, {
"type" : "WEB",
"url" : "http://archives.neohapsis.com/archives/bugtraq/2014-04/0134.html"
}, {
"type" : "WEB",
"url" : "http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html"
}, {
"type" : "WEB",
"url" : "http://cve.mitre.org/cgi-bin/cvename.cgi?name=2013-6393"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-updates/2014-02/msg00064.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-updates/2014-02/msg00065.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-updates/2015-02/msg00078.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-updates/2016-04/msg00050.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2014-0353.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2014-0354.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2014-0355.html"
}, {
"type" : "WEB",
"url" : "http://www.debian.org/security/2014/dsa-2850"
}, {
"type" : "WEB",
"url" : "http://www.debian.org/security/2014/dsa-2870"
}, {
"type" : "WEB",
"url" : "http://www.ubuntu.com/usn/USN-2098-1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:08:07Z",
"nvd_published_at" : null
}
}