artkamote / examples

Serverless Examples – A collection of boilerplates and examples of serverless architectures built with the Serverless Framework on AWS Lambda, Microsoft Azure, Google Cloud Functions, and more.
https://www.serverless.com/examples/
Other
0 stars 0 forks source link

CVE-2022-31129 (High) detected in multiple libraries #255

Open mend-bolt-for-github[bot] opened 2 years ago

mend-bolt-for-github[bot] commented 2 years ago

CVE-2022-31129 - High Severity Vulnerability

Vulnerable Libraries - moment-2.29.1.tgz, moment-2.27.0.tgz, moment-2.22.2.tgz

moment-2.29.1.tgz

Parse, validate, manipulate, and display dates

Library home page: https://registry.npmjs.org/moment/-/moment-2.29.1.tgz

Path to dependency file: /openwhisk-node-simple-http-endpoint/package.json

Path to vulnerable library: /openwhisk-node-simple-http-endpoint/node_modules/moment/package.json,/openwhisk-swift-scheduled-cron/node_modules/moment/package.json,/openwhisk-rust-simple-http-endpoint/node_modules/moment/package.json,/openwhisk-node-chaining-functions/node_modules/moment/package.json,/openwhisk-python-scheduled-cron/node_modules/moment/package.json,/openwhisk-go-simple/node_modules/moment/package.json,/openwhisk-node-and-docker-chaining-functions/node_modules/moment/package.json,/openwhisk-swift-simple/node_modules/moment/package.json,/openwhisk-python-simple-http-endpoint/node_modules/moment/package.json,/openwhisk-node-simple/node_modules/moment/package.json,/openwhisk-swift-simple-http-endpoint/node_modules/moment/package.json,/aws-node-signed-uploads/node_modules/moment/package.json,/aws-node-rest-api-typescript-simple/node_modules/moment/package.json,/openwhisk-php-simple/node_modules/moment/package.json,/aws-node-http-api-typescript/node_modules/moment/package.json,/aws-node-auth0-cognito-custom-authorizers-api/node_modules/moment/package.json,/aws-node-rest-api-with-dynamodb-and-offline/node_modules/moment/package.json,/aws-rust-simple-http-endpoint/node_modules/moment/package.json,/aws-node-dynamic-image-resizer/node_modules/moment/package.json,/openwhisk-swift-precompiled-binaries/node_modules/moment/package.json,/openwhisk-python-simple/node_modules/moment/package.json,/aws-golang-auth-examples/node_modules/moment/package.json,/aws-golang-dynamo-stream-to-elasticsearch/node_modules/moment/package.json,/azure-node-typescript-servicebus-trigger-endpoint/node_modules/moment/package.json,/kubeless-python-simple-function/node_modules/moment/package.json,/aws-python-auth0-custom-authorizers-api/node_modules/moment/package.json,/openwhisk-node-scheduled-cron/node_modules/moment/package.json,/aws-node-typescript-nest/node_modules/moment/package.json,/aws-node-http-api-dynamodb-local/node_modules/moment/package.json,/kubeless-python-simple-scheduled-function/node_modules/moment/package.json,/openwhisk-ruby-simple/node_modules/moment/package.json

Dependency Hierarchy: - moment-timezone-0.5.34.tgz (Root Library) - :x: **moment-2.29.1.tgz** (Vulnerable Library)

moment-2.27.0.tgz

Parse, validate, manipulate, and display dates

Library home page: https://registry.npmjs.org/moment/-/moment-2.27.0.tgz

Path to dependency file: /aws-node-typescript-apollo-lambda/package.json

Path to vulnerable library: /aws-node-typescript-apollo-lambda/node_modules/moment/package.json

Dependency Hierarchy: - serverless-1.79.0.tgz (Root Library) - enterprise-plugin-3.7.1.tgz - :x: **moment-2.27.0.tgz** (Vulnerable Library)

moment-2.22.2.tgz

Parse, validate, manipulate, and display dates

Library home page: https://registry.npmjs.org/moment/-/moment-2.22.2.tgz

Path to dependency file: /aws-node-oauth-dropbox-api/package.json

Path to vulnerable library: /aws-node-oauth-dropbox-api/node_modules/moment/package.json,/aws-node-github-check/node_modules/moment/package.json,/aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/node_modules/moment/package.json

Dependency Hierarchy: - serverless-offline-3.31.0.tgz (Root Library) - hapi-14.2.0.tgz - joi-9.2.0.tgz - :x: **moment-2.22.2.tgz** (Vulnerable Library)

Found in HEAD commit: dcbe4aefe4b3685f4b15493a01db0f19b118a0c4

Found in base branch: master

Vulnerability Details

moment is a JavaScript date library for parsing, validating, manipulating, and formatting dates. Affected versions of moment were found to use an inefficient parsing algorithm. Specifically using string-to-date parsing in moment (more specifically rfc2822 parsing, which is tried by default) has quadratic (N^2) complexity on specific inputs. Users may notice a noticeable slowdown is observed with inputs above 10k characters. Users who pass user-provided strings without sanity length checks to moment constructor are vulnerable to (Re)DoS attacks. The problem is patched in 2.29.4, the patch can be applied to all affected versions with minimal tweaking. Users are advised to upgrade. Users unable to upgrade should consider limiting date lengths accepted from user input.

Publish Date: 2022-07-06

URL: CVE-2022-31129

CVSS 3 Score Details (7.5)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: None - Integrity Impact: None - Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g

Release Date: 2022-07-06

Fix Resolution (moment): 2.29.4

Direct dependency fix Resolution (moment-timezone): 0.5.35

Fix Resolution (moment): 2.29.4

Direct dependency fix Resolution (serverless): 1.80.0-06ed01b8

Fix Resolution (moment): 2.29.4

Direct dependency fix Resolution (serverless-offline): 3.31.1


Step up your Open Source Security Game with Mend here

mend-bolt-for-github[bot] commented 1 month ago

:heavy_check_mark: This issue was automatically closed by Mend because the vulnerable library in the specific branch(es) was either marked as ignored or it is no longer part of the Mend inventory.

mend-bolt-for-github[bot] commented 1 month ago

:information_source: This issue was automatically re-opened by Mend because the vulnerable library in the specific branch(es) has been detected in the Mend inventory.