GHSA-v3rj-xjv7-4jmq: smol-toml Denial of Service Vulnerability
MODERATEGHSA-v3rj-xjv7-4jmq is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-674: Uncontrolled Recursion) affecting smol-toml libraries in the npm ecosystem. The issue involves denial of service via toml documents containing thousands of consecutive commented lines. Remediation is available by upgrading affected packages to version 1.6.1.
GHSA-v3rj-xjv7-4jmq at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix GHSA-v3rj-xjv7-4jmq
To remediate this vulnerability, upgrade all affected smol-toml 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 smol-toml@1.6.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls smol-toml
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-v3rj-xjv7-4jmq, inspect your project dependencies using npm:
npm ls smol-toml
Analyze the terminal output to locate any version of smol-toml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.1), your application is affected.
Note: The npm ls smol-toml 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-674: Uncontrolled Recursion, where the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. In smol-toml, 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
GHSA-v3rj-xjv7-4jmq Affected smol-toml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
smol-toml
|
npm |
< 1.6.1
|
1.6.1
|
References
Frequently Asked Questions
What is GHSA-v3rj-xjv7-4jmq?
Which smol-toml versions are affected?
What version fixes GHSA-v3rj-xjv7-4jmq?
Is smol-toml affected?
What is the CVSS score of GHSA-v3rj-xjv7-4jmq?
What CWE is associated with GHSA-v3rj-xjv7-4jmq?
How can I check npm dependencies for GHSA-v3rj-xjv7-4jmq?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v3rj-xjv7-4jmq",
"modified" : "2026-03-25T21:03:56Z",
"published" : "2026-03-25T21:03:56Z",
"aliases" : [ ],
"summary" : "smol-toml: Denial of Service via TOML documents containing thousands of consecutive commented lines",
"details" : "### Summary\nAn attacker can send a maliciously crafted TOML to cause the parser to crash, because of a stack overflow caused by thousands of consecutive commented lines.\n\nThe library uses recursion internally while parsing to skip over commented lines, which can be exploited to crash an application that is processing arbitrary TOML documents.\n\n### Proof of concept\n```js\nrequire(\"smol-toml\").parse('# comment\\n'.repeat(8000) + 'key = \"value\"')\n```\n\n### Impact\nApplications which parse arbitrary TOML documents may suffer availability issues if they receive malicious input. If uncaught, the crash may cause the application itself to crash. The impact is deemed minor, as the function is already likely to throw errors on invalid input. Downstream users are supposed to properly handle errors in such situations.\n\nDue to the design of most JavaScript runtimes, the uncontrolled recursion does not lead to excessive memory usage and the execution is quickly aborted.\n\nAs a reminder, it is **strongly** advised when working with untrusted user input to expect errors to occur and to appropriately catch them.\n\n### Patches\nVersion 1.6.1 uses a different approach for parsing comments, which no longer involves recursion.\n\n### Workarounds\nWrap all invocations of `parse` and `stringify` in a try/catch block when dealing with untrusted user input.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "smol-toml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/squirrelchat/smol-toml/security/advisories/GHSA-v3rj-xjv7-4jmq"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/squirrelchat/smol-toml"
}, {
"type" : "WEB",
"url" : "https://github.com/squirrelchat/smol-toml/releases/tag/v1.6.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-674" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-25T21:03:56Z",
"nvd_published_at" : null
}
}