Jsdoc, a widely-used API documentation generator for JavaScript, released version 3.6.1 as a minor update to its previous stable version, 3.6.0. While the core functionality remains consistent, reflected in the identical dependencies like klaw, marked, mkdirp, taffydb, bluebird, catharsis, requizzle, underscore, markdown-it, js2xmlparser, @babel/parser, markdown-it-anchor, strip-json-comments, and escape-string-regexp crucial for parsing and generating documentation, developers should note subtle refinements. Both versions share the same development dependencies, including ajv, nyc, gulp, gulp-eslint, and gulp-json-editor for testing and build processes.
The key difference lies in the release date, 3.6.1 being released on May 5th, 2019 a day after 3.6.0. Additionally, there's a tiny variation in the unpacked size of the package, with version 3.6.1 being slightly smaller, indicating potential minor optimizations or bug fixes, even though the file count remains constant. For developers, migrating from 3.6.0 to 3.6.1 should be seamless, assuming the update primarily addresses minor bugs or performance tweaks. Always consult the official changelog for a detailed breakdown of fixes and improvements to ensure compatibility with your project's specific configuration. The library, licensed under Apache-2.0 and maintained on GitHub, ensures a collaborative and open-source approach to JavaScript API documentation.
All the vulnerabilities related to the version 3.6.1 of the package
Regular Expression Denial of Service in marked
Affected versions of marked
are vulnerable to Regular Expression Denial of Service (ReDoS). The _label
subrule may significantly degrade parsing performance of malformed input.
Upgrade to version 0.7.0 or later.
Inefficient Regular Expression Complexity in marked
What kind of vulnerability is it?
Denial of service.
The regular expression inline.reflinkSearch
may cause catastrophic backtracking against some strings.
PoC is the following.
import * as marked from 'marked';
console.log(marked.parse(`[x]: x
\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](`));
Who is impacted?
Anyone who runs untrusted markdown through marked and does not use a worker with a time limit.
Has the problem been patched?
Yes
What versions should users upgrade to?
4.0.10
Is there a way for users to fix or remediate the vulnerability without upgrading?
Do not run untrusted markdown through marked or run marked on a worker thread and set a reasonable time limit to prevent draining resources.
Are there any links users can visit to find out more?
If you have any questions or comments about this advisory:
Inefficient Regular Expression Complexity in marked
What kind of vulnerability is it?
Denial of service.
The regular expression block.def
may cause catastrophic backtracking against some strings.
PoC is the following.
import * as marked from "marked";
marked.parse(`[x]:${' '.repeat(1500)}x ${' '.repeat(1500)} x`);
Who is impacted?
Anyone who runs untrusted markdown through marked and does not use a worker with a time limit.
Has the problem been patched?
Yes
What versions should users upgrade to?
4.0.10
Is there a way for users to fix or remediate the vulnerability without upgrading?
Do not run untrusted markdown through marked or run marked on a worker thread and set a reasonable time limit to prevent draining resources.
Are there any links users can visit to find out more?
If you have any questions or comments about this advisory:
TaffyDB can allow access to any data items in the DB
TaffyDB allows attackers to forge adding additional properties into user-input processed by taffy which can allow access to any data items in the DB. Taffy sets an internal index for each data item in its DB. However, it is found that the internal index can be forged by adding additional properties into user-input. If index is found in the query, TaffyDB will ignore other query conditions and directly return the indexed data item. Moreover, the internal index is in an easily-guessable format (e.g., T000002R000001). As such, attackers can use this vulnerability to access any data items in the DB. Note: taffy
and its successor package taffydb
are not maintained.
Arbitrary Code Execution in underscore
The package underscore
from 1.13.0-0 and before 1.13.0-2, from 1.3.2 and before 1.12.1 are vulnerable to Arbitrary Code Execution via the template function, particularly when a variable property is passed as an argument as it is not sanitized.
Uncontrolled Resource Consumption in markdown-it
Special patterns with length > 50K chars can slow down parser significantly.
const md = require('markdown-it')();
md.render(`x ${' '.repeat(150000)} x \nx`);
Upgrade to v12.3.2+
No.
Fix + test sample: https://github.com/markdown-it/markdown-it/commit/ffc49ab46b5b751cd2be0aabb146f2ef84986101