Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 [security] Update pug 2.0.3 → 3.0.3 (major) #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented May 28, 2024


🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ pug (2.0.3 → 3.0.3) · Repo · Changelog

Security Advisories 🚨

🚨 Pug allows JavaScript code execution if an application accepts untrusted input

Pug through 3.0.2 allows JavaScript code execution if an application accepts untrusted input for the name option of the compileClient, compileFileClient, or compileClientWithDependenciesTracked function. NOTE: these functions are for compiling Pug templates into JavaScript, and there would typically be no reason to allow untrusted callers.

🚨 Remote code execution via the `pretty` option.

Impact

If a remote attacker was able to control the pretty option of the pug compiler, e.g. if you spread a user provided object such as the query parameters of a request into the pug template inputs, it was possible for them to achieve remote code execution on the node.js backend.

Patches

Upgrade to pug@3.0.1 or pug-code-gen@3.0.2 or pug-code-gen@2.0.3, which correctly sanitise the parameter.

Workarounds

If there is no way for un-trusted input to be passed to pug as the pretty option, e.g. if you compile templates in advance before applying user input to them, you do not need to upgrade.

References

Original report: #3312

For more information

If you believe you have found other vulnerabilities, please DO NOT open an issue. Instead, you can follow the instructions in our Security Policy

↗️ constantinople (indirect, 3.1.2 → 4.0.1) · Repo

Commits

See the full diff on Github. The new version differs by 5 commits:

↗️ function-bind (indirect, 1.1.1 → 1.1.2) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by 26 commits:

↗️ is-regex (indirect, 1.0.4 → 1.1.4) · Repo · Changelog

Release Notes

1.1.4 (from changelog)

Commits

  • [Dev Deps] update auto-changelog, core-js, eslint, tape 4b17cad
  • [Refactor] use has-tostringtag to behave correctly in the presence of symbol shams 2dad4af

1.1.3 (from changelog)

Commits

  • [actions] use node/install instead of node/run; use codecov action c681ab9
  • [Fix] do not use Object.prototype.toString when Symbol.toStringTag is shammed ca019fd
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, tape 605a66f
  • [readme] add actions and codecov badges 8d7c6f0
  • [meta] use prepublishOnly script for npm 7+ 8e50e91
  • [Deps] update has-symbols 4742c81

1.1.0 (from changelog)

Commits

  • [New] use badStringifier‑based RegExp detection 31eff67
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, tape fc91458
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape; add safe-publish-latest d43ed83
  • [Dev Deps] update auto-changelog, tape; add aud 56647d1
  • [meta] only run aud on prod deps e0865b8

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 60 commits:

↗️ pug-code-gen (indirect, 2.0.1 → 3.0.3) · Repo · Changelog

Security Advisories 🚨

🚨 Pug allows JavaScript code execution if an application accepts untrusted input

Pug through 3.0.2 allows JavaScript code execution if an application accepts untrusted input for the name option of the compileClient, compileFileClient, or compileClientWithDependenciesTracked function. NOTE: these functions are for compiling Pug templates into JavaScript, and there would typically be no reason to allow untrusted callers.

🚨 Remote code execution via the `pretty` option.

Impact

If a remote attacker was able to control the pretty option of the pug compiler, e.g. if you spread a user provided object such as the query parameters of a request into the pug template inputs, it was possible for them to achieve remote code execution on the node.js backend.

Patches

Upgrade to pug@3.0.1 or pug-code-gen@3.0.2 or pug-code-gen@2.0.3, which correctly sanitise the parameter.

Workarounds

If there is no way for un-trusted input to be passed to pug as the pretty option, e.g. if you compile templates in advance before applying user input to them, you do not need to upgrade.

References

Original report: #3312

For more information

If you believe you have found other vulnerabilities, please DO NOT open an issue. Instead, you can follow the instructions in our Security Policy

🚨 Remote code execution via the `pretty` option.

Impact

If a remote attacker was able to control the pretty option of the pug compiler, e.g. if you spread a user provided object such as the query parameters of a request into the pug template inputs, it was possible for them to achieve remote code execution on the node.js backend.

Patches

Upgrade to pug@3.0.1 or pug-code-gen@3.0.2 or pug-code-gen@2.0.3, which correctly sanitise the parameter.

Workarounds

If there is no way for un-trusted input to be passed to pug as the pretty option, e.g. if you compile templates in advance before applying user input to them, you do not need to upgrade.

References

Original report: #3312

For more information

If you believe you have found other vulnerabilities, please DO NOT open an issue. Instead, you can follow the instructions in our Security Policy

🆕 @​babel/helper-string-parser (added, 7.24.6)

🆕 @​babel/helper-validator-identifier (added, 7.24.6)

🆕 assert-never (added, 1.2.1)

🆕 babel-walk (added, 3.0.0-canary-5)

🆕 call-bind (added, 1.0.7)

🆕 define-data-property (added, 1.1.4)

🆕 es-define-property (added, 1.0.0)

🆕 es-errors (added, 1.3.0)

🆕 get-intrinsic (added, 1.2.4)

🆕 gopd (added, 1.0.1)

🆕 has-property-descriptors (added, 1.0.2)

🆕 has-proto (added, 1.0.3)

🆕 has-symbols (added, 1.0.3)

🆕 has-tostringtag (added, 1.0.2)

🆕 hasown (added, 2.0.2)

🆕 is-core-module (added, 2.13.1)

🆕 set-function-length (added, 1.2.2)

🆕 supports-preserve-symlinks-flag (added, 1.0.0)

🗑️ @​types/babel-types (removed)

🗑️ @​types/babylon (removed)

🗑️ acorn-globals (removed)

🗑️ align-text (removed)

🗑️ center-align (removed)

🗑️ has (removed)

🗑️ lazy-cache (removed)

🗑️ longest (removed)

🗑️ right-align (removed)

🗑️ uglify-to-browserify (removed)

🗑️ window-size (removed)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added depfu good first issue Good for newcomers labels May 28, 2024
Copy link

codeclimate bot commented May 28, 2024

Code Climate has analyzed commit a9c1d2e and detected 0 issues on this pull request.

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depfu good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant