Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

chore(deps): update dependency pug to v3 [security] - autoclosed #815

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 3, 2021

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
pug (source) 2.0.3 -> 3.0.1 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2021-21353

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 [email protected] or [email protected] or [email protected], 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: https://github.com/pugjs/pug/issues/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


Release Notes

pugjs/pug

v3.0.1

Compare Source

Bug Fixes

  • Sanitise the pretty option (#​3314)

    If a malicious attacker could control the pretty option, it was possible for them to achieve remote code execution on the server rendering the template. All pug users should upgrade as soon as possible, see #​3312 for more details.

v3.0.0

Compare Source

Breaking Changes

  • read plugins must now return Buffer if you want to support filters that use renderBuffer (#​3213)

    If you don't wish to support this advanced use case, you can continue returning string. If you did not provide a read plugin, you do not need to do anything.

  • The minify option on filters now requires you to install the relevant jstransformer (#​3084)

    Currently we support:

    • jstransformer-uglify-js for JavaScript
    • jstransformer-clean-css for CSS
  • Drop support for node 6 and 8 (#​3243)

New Features

  • Support filters that apply to Buffers (#​3213)

    e.g.

    // options.js
    exports.filters = {
      png: {
        // instead of a function, specify an object with a "renderBuffer" property
        // whose value is a function that takes a Buffer instead of a string
        renderBuffer: function(buffer, options) {
          var data = Buffer.from(buffer).toString('base64');
          return '<img src="data:image/png;base64, ' + data + '"/>';
        }
      }
    };

    You can then use the filter like:

    // foo.pug
    include:png my-small-image.png
  • Add support for replacing code gen via a plugin with generateCode (#​3230)

  • Support each ... of ... loops (#​3179)

    each value of iterable
      li= value

    This requires an environment that supports the for (const val of iterable) syntax in JS. You can iterate over Maps, Sets etc. as well as arrays. There is also some destructuring of map keys:

    - const map = new Map([['a', 'x'], ['b', 'y']]);
    each [key, value] of map
      li
        strong= key
        = value

v2.0.4: 2.0.4

Compare Source

  • fix: improve error message when requiring a filter that's not installed
  • fix: toJSON is now only called on object-like values
  • fix: preLex plugins were not called when compiling from a string
  • perf: add "files" property to exclude un-used files from package and reduce install size
  • feat: support ... spread attributes when compiling to JSX N.B. this will not work when rendering to HTML

Configuration

📅 Schedule: Branch creation - "" in timezone Europe/Paris, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 7 times, most recently from 9b72f36 to 52b9a90 Compare June 14, 2021 16:44
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 2 times, most recently from a758578 to 13e1730 Compare July 5, 2021 07:13
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 2 times, most recently from cb8de6e to 6dfc6ef Compare July 30, 2021 09:45
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 2 times, most recently from 6fbde9e to e16ecbd Compare October 8, 2021 09:38
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 4 times, most recently from 32f5dde to 4a0cc4a Compare October 19, 2021 15:05
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 2 times, most recently from 1472c55 to 72fd93b Compare December 13, 2021 14:56
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch from 72fd93b to e14fe64 Compare January 19, 2022 09:18
@renovate renovate bot changed the title chore(deps): update dependency pug to v3 [security] chore(deps): update dependency pug to v3 [security] - autoclosed Mar 12, 2022
@renovate renovate bot closed this Mar 12, 2022
@renovate renovate bot deleted the renovate/npm-pug-vulnerability branch March 12, 2022 00:19
@renovate renovate bot changed the title chore(deps): update dependency pug to v3 [security] - autoclosed chore(deps): update dependency pug to v3 [security] Mar 15, 2022
@renovate renovate bot reopened this Mar 15, 2022
@renovate renovate bot restored the renovate/npm-pug-vulnerability branch March 15, 2022 18:20
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 4 times, most recently from e942b34 to 0c0e6ef Compare March 18, 2022 15:36
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 5 times, most recently from edab3a1 to 9d4bee9 Compare April 8, 2022 15:50
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch from 9d4bee9 to 1773986 Compare May 2, 2022 10:42
@renovate renovate bot changed the title chore(deps): update dependency pug to v3 [security] chore(deps): update dependency pug to v3 [security] - autoclosed May 11, 2022
@renovate renovate bot closed this May 11, 2022
@renovate renovate bot deleted the renovate/npm-pug-vulnerability branch May 11, 2022 15:52
@renovate renovate bot changed the title chore(deps): update dependency pug to v3 [security] - autoclosed chore(deps): update dependency pug to v3 [security] May 11, 2022
@renovate renovate bot reopened this May 11, 2022
@renovate renovate bot restored the renovate/npm-pug-vulnerability branch May 11, 2022 17:47
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 3 times, most recently from e6d8e49 to 9bba634 Compare June 20, 2022 11:35
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 2 times, most recently from 9eec5c1 to 5722c7e Compare June 24, 2022 16:53
@renovate renovate bot changed the title chore(deps): update dependency pug to v3 [security] chore(deps): update dependency pug to v3 [SECURITY] Jun 27, 2022
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch from 5722c7e to 4aad29f Compare June 27, 2022 08:31
@renovate renovate bot changed the title chore(deps): update dependency pug to v3 [SECURITY] chore(deps): update dependency pug to v3 [security] Jun 28, 2022
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 2 times, most recently from b0132cc to ca7f8dc Compare August 3, 2022 12:30
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch 2 times, most recently from 25e9653 to 7151940 Compare September 12, 2022 15:56
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch from 7151940 to e189073 Compare October 24, 2022 13:12
@renovate renovate bot force-pushed the renovate/npm-pug-vulnerability branch from e189073 to 4615a13 Compare November 14, 2022 18:39
@renovate renovate bot changed the title chore(deps): update dependency pug to v3 [security] chore(deps): update dependency pug to v3 [security] - autoclosed Dec 9, 2022
@renovate renovate bot closed this Dec 9, 2022
@renovate renovate bot deleted the renovate/npm-pug-vulnerability branch December 9, 2022 00:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants