Skip to content

[Snyk] Security upgrade express from 4.17.1 to 4.21.2 - #347

Open
dotam99 wants to merge 1 commit into
mainfrom
snyk-fix-b35531ccc8efba1d7f3a72de2d5d9f5a
Open

[Snyk] Security upgrade express from 4.17.1 to 4.21.2#347
dotam99 wants to merge 1 commit into
mainfrom
snyk-fix-b35531ccc8efba1d7f3a72de2d5d9f5a

Conversation

@dotam99

Copy link
Copy Markdown
Owner

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • package.json
  • package-lock.json

Vulnerabilities that will be fixed with an upgrade:

IssueScore
high severityRegular Expression Denial of Service (ReDoS)
SNYK-JS-PATHTOREGEXP-8482416
721

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note:You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Regular Expression Denial of Service (ReDoS)

@guardrails

Copy link
Copy Markdown

⚠️ We detected 102 security issues in this pull request:

Mode: paranoid | Total findings: 102 | Considered vulnerability: 102

Insecure Access Control (6)
SeverityDetailsDocs
MediumTitle: Tainted input passed to an open redirect (express)
returnres.redirect(301,externalSites[req.path])
📚
MediumTitle: Tainted input passed to an open redirect (express)
returnres.redirect(301,redirect)
📚
MediumTitle: Tainted input passed to an open redirect (express)
returnres.redirect(`https://enterprise.github.com/releases/${requestedVersion}.0/notes`)
📚
MediumTitle: Tainted input passed to an open redirect (express)
returnres.redirect(301,req.baseUrl+req.path.replace(/^\/en/,''))
📚
MediumTitle: Tainted input passed to an open redirect (express)
returnres.redirect(301,redirect)
📚
MediumTitle: Tainted input passed to an open redirect (express)
returnres.redirect(301,req.path.replace(redirectPattern,`/${language.code}`))
📚

More info on how to fix Insecure Access Control in JavaScript.


Insecure File Management (11)
SeverityDetailsDocs
HighTitle: Path Traversal from user input
📚
HighTitle: Path Traversal from user input
newHref=path.join('/',languageCode,href)
📚
HighTitle: Path Traversal from user input
newHref=path.join('/',languageCode,href)
📚
HighTitle: Path Traversal from user input
constmapTopicOrArticlePath=path.posix.join(categoryPath,pathParts[2])
📚
HighTitle: Path Traversal from user input
constcategoryPath=removeFPTFromPath(path.posix.join('/','en',req.context.currentVersion,'early-access',pathParts[0],pathParts[1]))
📚
HighTitle: Path Traversal from user input
title: product.title
📚
HighTitle: Path Traversal from user input
constcategoryPath=removeFPTFromPath(path.posix.join('/',req.context.currentLanguage,req.context.currentVersion,productPath,pathParts[1]))
📚
HighTitle: Path Traversal from user input
constproductPath=path.posix.join('/',req.context.currentProduct)
📚
HighTitle: Path Traversal from user input
href: removeFPTFromPath(path.posix.join('/',req.context.currentLanguage,req.context.currentVersion,productPath)),
📚
HighTitle: Path Traversal from user input
constproxyPath=path.join('/',requestedVersion,assetPath)
📚
HighTitle: Path Traversal from user input
consthref=removeFPTFromPath(path.join('/',context.currentLanguage,version,linkPath))
📚

More info on how to fix Insecure File Management in JavaScript.


Insecure Processing of Data (6)
SeverityDetailsDocs
HighTitle: Insecure Deserialization (js-yaml)
constdata=yaml.load(fs.readFileSync(fullpath,'utf8'),{ fullpath })
📚
HighTitle: Insecure Deserialization (js-yaml)
returnyaml.load(fs.readFileSync(filename,'utf8'),{ filename })
📚
MediumTitle: Tainted input passed to Express response
returnres.send(awaitliquid.parseAndRender(layouts['dev-toc'],req.context))
📚
MediumTitle: Tainted input passed to Express response
returnres.send(req.path.replace(/\//g,''))
📚
MediumTitle: Tainted input passed to Express response
returnres.send(awaitliquid.parseAndRender(layouts['enterprise-server-releases'],req.context))
📚
MediumTitle: Tainted input passed to Express response
res.send(addCsrf(req,output))
📚

More info on how to fix Insecure Processing of Data in JavaScript.


Insecure Use of Language/Framework API (42)
SeverityDetailsDocs
MediumTitle: User Controlled Method Invocation
schema.send(:own_orphan_types).clear
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constchangedFilesRelPaths=execSync('git diff --name-only origin/main | egrep "^translations/.*/.+.(yml|md)$"',{maxBuffer: 1024*1024*100}).toString().split('\n')
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constfixable=execSync(`cat ${fixableErrorsLog} | egrep "^translations/.*/(.+.md|.+.yml)$" | sed -e 's/^/- [ ] /' | uniq`).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constfilesToAdd=execSync(`cat ${parsingErrorsLog}${renderingErrorsLog} | egrep "^translations/.*/(.+.md|.+.yml)$" | sed -e 's/^/- [ ] /' | uniq`).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constallErrors=execSync('cat ~/docs-*').toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync(`git checkout main -- ${relativePath}`,{stdio: 'pipe'})
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constgithubBranch=execSync('git rev-parse --abbrev-ref HEAD',{cwd: githubRepoDir}).toString().trim()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync('git pull',{cwd: githubRepoDir})
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync(`${path.join(githubRepoDir,'bin/openapi')} bundle -o ${tempDocsDir} --include_unpublished`,{stdio: 'inherit'})
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync(`find ${tempDocsDir} -type f -name "*deref.json" -exec mv '{}' ${dereferencedPath} ';'`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constgitStatusOfFile=execSync(`git status --porcelain ${oldContentPath}`).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync(`mv ${oldContentPath}${newContentPath}`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync(`git mv ${oldContentPath}${newContentPath}`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
awaitexec(`script/reset-translated-file.js --prefer-main ${file}`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constcurrentBranch=execSync('git symbolic-ref --short HEAD',{encoding: 'utf8'}).trim()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constfilenames=execSync('git diff --cached --name-only').toString().trim().split('\n')
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constresult=execSync(`${purgeCommand}${localizedUrl}`).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constsecondResult=execSync(`${purgeCommand}${localizedUrl}`).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync(`TEST_TRANSLATION=true npx jest content/lint-files > ${parsingErrorsLog}`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync(`script/test-render-translation.js > ${renderErrorsLog}`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync(`cat ${parsingErrorsLog}${renderErrorsLog} | egrep "^translations/.*/(.+.md|.+.yml)$" | uniq | xargs -L1 script/reset-translated-file.js --prefer-main`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync(`mkdir ${productDir}`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync(`git mv ${oldCategoryDir}${productDir}`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constgrepResults=execSync(grepCmd).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constchangedFilesRelPaths=execSync(cmd).toString().split('\n')
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constnewPath=execSync(`find ${newDotcomDir} -name ${filename}`).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync('gem which graphql')
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync('npx prettier -w "**/*.{yml,yaml}"')
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constremoteClean=execSync(`${removeHiddenMembersScript}${tempSchemaFilePath}`).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
execSync('npm run build',{stdio: 'inherit'})
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
currentBranch=execSync('git branch --show-current').toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
letbranchExists=execSync(`git ls-remote --heads ${earlyAccessFullRepo}${earlyAccessBranch}`).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
branchExists=execSync(`git ls-remote --heads ${earlyAccessFullRepo}${earlyAccessBranch}`).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
cwd: earlyAccessCloningParentDir
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
exec(`git reset $(git merge-base ${base} HEAD)`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
exec('git add -A')
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
exec(`git commit -m "${message}"`)
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
while((optionsMatch=OptionsSyntax.exec(match.groups.options))){
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constchangedFiles=execSync('git diff --name-only HEAD').toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constchangedFilesRelPaths=execSync('git diff --name-only origin/main | egrep "^translations/.*/.+.md$"',{maxBuffer: 1024*1024*100})
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constgrepResults=execSync(grepCmd).toString()
📚
HighTitle: Child process (child_process) methods accept untrusted data to execute
constmatch=liquidVariableSyntax.exec(this.param)
📚

More info on how to fix Insecure Use of Language/Framework API in Ruby and JavaScript.


Insecure Use of Regular Expressions (1)
SeverityDetailsDocs
MediumTitle: Tainted input passed to Regular Expression
constenglishPath=req.path.replace(newRegExp(`^/${req.language}`),'/en')
📚

More info on how to fix Insecure Use of Regular Expressions in JavaScript.


Vulnerable Libraries (36)
SeverityDetails
Informationalpkg:npm/csurf@1.11.0 upgrade to: > 1.11.0
Highpkg:npm/throng@5.0.0 upgrade to: > 5.0.0
Mediumpkg:npm/lodash@4.17.20 upgrade to: 4.17.21
Criticalpkg:npm/copy-webpack-plugin@6.4.1 upgrade to: > 6.4.1
Highpkg:npm/morgan@1.9.1 upgrade to: > 1.9.1
Highpkg:npm/sass@1.32.8 upgrade to: > 1.32.8
Criticalpkg:npm/resolve-url-loader@4.0.0 upgrade to: > 4.0.0
Informationalpkg:npm/cookie-parser@1.4.5 upgrade to: > 1.4.5
Highpkg:npm/rimraf@3.0.0 upgrade to: > 3.0.0
Mediumpkg:npm/webpack@5.30.0 upgrade to: 5.94.0
Highpkg:npm/algoliasearch@3.35.1 upgrade to: > 3.35.1
Mediumpkg:npm/semver@5.7.1 upgrade to: 7.5.2
Informationalpkg:npm/rehype-highlight@3.1.0 upgrade to: > 3.1.0
Highpkg:npm/rss-parser@3.12.0 upgrade to: > 3.12.0
Criticalpkg:npm/flat@5.0.0 upgrade to: 5.0.1
Highpkg:npm/@babel/plugin-transform-runtime@7.11.0 upgrade to: > 7.11.0
Criticalpkg:npm/babel-preset-env@1.7.0 upgrade to: > 1.7.0
N/Apkg:npm/got@9.6.0 upgrade to: 12.1.0,11.8.5
Highpkg:npm/remark-rehype@5.0.0 upgrade to: > 5.0.0
Highpkg:npm/compression@1.7.4 upgrade to: > 1.7.4
Highpkg:npm/walk-sync@1.1.4 upgrade to: > 1.1.4
Highpkg:npm/hast-util-select@4.0.2 upgrade to: > 4.0.2
Highpkg:npm/cheerio@1.0.0-rc.3 upgrade to: > 1.0.0-rc.3
Highpkg:npm/express@4.21.2 upgrade to: > 4.21.2
Highpkg:npm/node-fetch@2.6.1 upgrade to: 3.1.1,2.6.7
Criticalpkg:npm/mini-css-extract-plugin@1.4.1 upgrade to: > 1.4.1
Criticalpkg:npm/browser-date-formatter@3.0.3 upgrade to: > 3.0.3
Criticalpkg:npm/style-loader@1.2.1 upgrade to: > 1.2.1
Mediumpkg:npm/liquidjs@9.22.1 upgrade to: 10.0.0
Highpkg:npm/cross-env@7.0.2 upgrade to: > 7.0.2
Criticalpkg:npm/babel-loader@8.1.0 upgrade to: > 8.1.0
Highpkg:npm/remark-parse@7.0.2 upgrade to: > 7.0.2
Highpkg:npm/webpack-cli@4.6.0 upgrade to: > 4.6.0
Criticalpkg:npm/linkinator@2.13.1 upgrade to: > 2.13.1
Criticalpkg:npm/sass-loader@9.0.2 upgrade to: > 9.0.2
Criticalpkg:npm/css-loader@5.0.0 upgrade to: > 5.0.0

More info on how to fix Vulnerable Libraries in JavaScript.


👉 Go to the dashboard for detailed results.

📥 Happy? Share your feedback with us.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@dotam99@snyk-bot