[Aikido] Fix 2 critical issues in tough-cookie, json-schema and 16 other issues - #52
Open
aikido-autofix[bot] wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade dependencies to fix critical prototype pollution vulnerabilities in tough-cookie and json-schema, plus HTTP Parameter Pollution in form-data.
✅ No breaking changes from the upgraded packages affect this codebase. All packages with breaking changes (
tough-cookie,qs,uuid,ajv, andlodash) are transitive dependencies that are not directly imported or used in the code. The codebase only directly usesrequest-promise-native,xml2js-es6-promise, andcli-table, along with built-in Node.js modules. The transitive dependency upgrades are managed by the direct dependencies (requestandrequest-promise-native), which will handle any compatibility requirements internally.All breaking changes by upgrading tough-cookie from version 2.3.4 to 4.1.4 (CHANGELOG)
findCookies()- callback function has to be last to comply withuniversalify.call()for inheritance with function prototypesAll breaking changes by upgrading qs from version 6.4.0 to 6.16.0 (CHANGELOG)
stringify: throw on cycles, instead of an infinite loop (#395, #394, #393)All breaking changes by upgrading uuid from version 3.1.0 to 11.1.1 (CHANGELOG)
require('uuid/v4')is no longer supportedAll breaking changes by upgrading ajv from version 4.11.8 to 6.15.0 (CHANGELOG)
$idkeyword is now used as schema URI instead ofidexclusiveMaximumandexclusiveMinimumkeywords must be numbers instead of booleansswitch,patternRequired,formatMinimum, andformatMaximummoved to ajv-keywords package (^2.0.0)compileAsyncmethod now returns Promise instead of previous behaviorbeautify: trueis no longer supportedv5is no longer usedextendRefsdefault changed fromtrueto"ignore"- when $ref is used other keywords are now ignoredsourceCodedefault changed fromtruetofalse- source code of validation functions no longer stored by defaultunknownFormatsdefault changed from"ignore"totrue- now fails schema compilation by defaulttranspileoption now require ajv-async package"co*"(co-wrapped generator functions)true$idkeyword is used as schema ID by default;schemaIdoption must be set to "id" or "auto" foridkeyword to be usedpatternGroupskeywordAll breaking changes by upgrading lodash from version 4.17.21 to 4.18.1 (CHANGELOG)
_.unset/_.omitnow blockconstructorandprototypeas non-terminal path keys unconditionally. Calls that previously returnedtrueand deleted the property now returnfalseand leave the target untouched._.templatenow throws"Invalid imports option passed into _.template"whenimportskeys contain forbidden identifier characters, which were previously allowed.✅ 18 CVEs resolved by this upgrade, including 3 critical 🚨 CVEs
This PR will resolve the following CVEs:
This issue affects form-data: < 2.5.4, 3.0.0 - 3.0.3, 4.0.0 - 4.0.3.
__proto__keys in query strings, causing Node process hangs and denial of service in Express applications without authentication.qs.stringifyto throw a TypeError when serializing objects with a non-callableisBufferproperty in their constructor, allowing attackers to trigger denial of service by crafting malicious input that gets re-serialized.Hawk.authenticate()function when processing HTTP requests.$dataoption is enabled by using inherited property names likeconstructorortoStringas format values, causing unexpected validation behavior or errors.🤖 Remediation details
Fix transitive security vulnerabilities in
issue_checkerdependenciesShort summary
This PR remediates security vulnerabilities in ten transitive packages — tough-cookie, json-schema, form-data, hoek, qs, hawk, uuid, ajv, lodash, and xml2js — all pulled in through the
request,request-promise-native, andxml2js-es6-promisedirect dependencies declared inissue_checker/package.json. Fixes are applied via a direct dependency bump (request), lockfile-only selector refreshes (jsprim,lodash), andresolutionsentries for packages whose parent chains had no viable upgrade path. Onlyissue_checker/package.jsonandissue_checker/yarn.lockare modified.tough-cookie
Resolved from
2.3.4to4.1.4via aresolutionsentry (^4.1.3). Bothrequest(all published versions cap at~2.5.0) andrequest-promise-native(permissive>=2.3.0range but stale in the lockfile) could not deliver a patched version through a parent bump alone, so a resolution was required to force the lockfile past the2.xceiling.json-schema
Resolved from
0.2.3to0.4.0by refreshing thejsprimlockfile entry.jsprim@1.4.1pinnedjson-schemaexactly at0.2.3; bumpingjsprimto1.4.2(within the existing^1.2.2range already declared byhttp-signature) caused it to declarejson-schema@0.4.0, which is the minimum patched version. No manifest change was needed beyond the lockfile refresh.form-data
Resolved from
2.1.4to2.5.6via aresolutionsentry (^2.5.6). Even after bumpingrequestto2.88.2, that version pinsform-dataat~2.3.2, which caps at2.3.x— well below the2.5.4/2.5.6patch floor. A resolution was the only way to reach a patched2.xrelease without replacingrequestentirely.hoek
Removed from the lockfile entirely.
hoek@2.16.3was pulled in exclusively byhawk,boom, andsntp— all of which are themselves dependencies ofhawk. Bumpingrequestto^2.88.0caused Yarn to resolverequest@2.88.2, which droppedhawkas a dependency, transitively eliminatinghoek,boom,sntp, andcryptilesfrom the tree. The unscopedhoekpackage's highest published version (6.1.3) does not satisfy the>=8.5.1patch requirement, so removal via the parent bump was the correct path.qs
Resolved from
6.4.0to6.16.0via aresolutionsentry (^6.16.0).request@2.88.2pinsqsat~6.5.2, which caps at6.5.x— far below the6.16.0floor required to address all advisories in scope. No published version ofrequestdeclares aqsrange that admits6.16.0, making a resolution necessary.hawk
Removed from the lockfile entirely as a side effect of bumping
requestto^2.88.0.request@2.87.0was the first version to drophawkas a dependency; resolvingrequest@2.88.2therefore eliminateshawk@3.1.3from the tree. No published version ofhawkitself satisfies the>=9.0.1patch requirement under the unscoped package name, so removal via the parent bump was the correct and only viable path.uuid
Resolved from
3.1.0to11.1.1via aresolutionsentry (^11.1.1).request@2.88.2pinsuuidat^3.3.2, which is bounded to3.x. No published version ofrequestwidens that range to admituuid@11.x, so a resolution was required to cross the major version boundary to the patched release.ajv
Resolved from
4.11.8to6.15.0by bumpingrequestto^2.88.0.request@2.88.0was the first version to declarehar-validator@~5.1.0;har-validator@5.1.5in turn declaresajv@^6.12.3, which resolves to6.15.0— satisfying the>=6.15.0patch floor. The priorrequest@2.81.0usedhar-validator@~4.2.1, which only admittedajv@^4.9.1.lodash
Resolved from
4.17.21to4.18.1via a lockfile-only selector refresh (yarn upgrade 'lodash@^4.13.1'). The parentrequest-promise-core@1.1.1already declareslodash@^4.13.1, a range that admits4.18.x; the lockfile entry was simply stale and needed refreshing to pick up the patched release.xml2js
Resolved from
0.4.19to0.5.0via aresolutionsentry (^0.5.0). The sole parentxml2js-es6-promise@1.1.1(the only published version of that package) pinsxml2jsat^0.4.16, which caps at0.4.x. Since no newer version ofxml2js-es6-promiseexists to widen that range, a resolution was the only path to the patched0.5.0release.Version changes
request^2.81.0^2.88.0hawk, upgradehar-validator→ajv, and enable other transitive fixestough-cookie2.3.44.1.4resolutionsoverride (parentrequestcaps at~2.5.0)json-schema0.2.30.4.0jsprimto1.4.2jsprim1.4.11.4.2json-schema@0.4.0form-data2.1.42.5.6resolutionsoverride (parentrequest@2.88.2caps at~2.3.2)hoek2.16.3hawkviarequestbumpqs6.4.06.16.0resolutionsoverride (parentrequest@2.88.2caps at~6.5.2)hawk3.1.3request@2.88.0+uuid3.1.011.1.1resolutionsoverride (parentrequest@2.88.2caps at^3.3.2)ajv4.11.86.15.0requestbump (viahar-validator@5.1.5)lodash4.17.214.18.1^4.13.1rangexml2js0.4.190.5.0resolutionsoverride (parentxml2js-es6-promise@1.1.1caps at^0.4.16)har-validator4.2.15.1.5requestbump — carries patchedajv@^6.12.3boom2.10.1hawkviarequestbumpsntp1.0.9hawkviarequestbumpcryptiles2.0.5hawkviarequestbump