janus-idp / backstage-showcase

This repo is moving to https://github.com/redhat-developer/red-hat-developer-hub
https://showcase.janus-idp.io
Apache License 2.0
110 stars 143 forks source link

chore(deps): update dependency jinja2 to v3.1.4 [security] #1234

Closed renovate[bot] closed 5 months ago

renovate[bot] commented 5 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
jinja2 (changelog) ==3.1.3 -> ==3.1.4 age adoption passing confidence
jinja2 (changelog) ~=3.1.3 -> ~=3.1.4 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2024-34064

The xmlattr filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, /, >, or =, as each would then be interpreted as starting a separate attribute. If an application accepts keys (as opposed to only values) as user input, and renders these in pages that other users see as well, an attacker could use this to inject other attributes and perform XSS. The fix for the previous GHSA-h5c8-rqwp-cp95 CVE-2024-22195 only addressed spaces but not other characters.

Accepting keys as user input is now explicitly considered an unintended use case of the xmlattr filter, and code that does so without otherwise validating the input should be flagged as insecure, regardless of Jinja version. Accepting values as user input continues to be safe.


Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter

CVE-2024-34064 / GHSA-h75v-3vvj-5mfj

More information #### Details The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would then be interpreted as starting a separate attribute. If an application accepts keys (as opposed to only values) as user input, and renders these in pages that other users see as well, an attacker could use this to inject other attributes and perform XSS. The fix for the previous GHSA-h5c8-rqwp-cp95 CVE-2024-22195 only addressed spaces but not other characters. Accepting keys as user input is now explicitly considered an unintended use case of the `xmlattr` filter, and code that does so without otherwise validating the input should be flagged as insecure, regardless of Jinja version. Accepting _values_ as user input continues to be safe. #### Severity - CVSS Score: 5.4 / 10 (Medium) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N` #### References - [https://github.com/pallets/jinja/security/advisories/GHSA-h75v-3vvj-5mfj](https://togithub.com/pallets/jinja/security/advisories/GHSA-h75v-3vvj-5mfj) - [https://nvd.nist.gov/vuln/detail/CVE-2024-34064](https://nvd.nist.gov/vuln/detail/CVE-2024-34064) - [https://github.com/pallets/jinja/commit/0668239dc6b44ef38e7a6c9f91f312fd4ca581cb](https://togithub.com/pallets/jinja/commit/0668239dc6b44ef38e7a6c9f91f312fd4ca581cb) - [https://github.com/pallets/jinja](https://togithub.com/pallets/jinja) This data is provided by [OSV](https://osv.dev/vulnerability/GHSA-h75v-3vvj-5mfj) and the [GitHub Advisory Database](https://togithub.com/github/advisory-database) ([CC-BY 4.0](https://togithub.com/github/advisory-database/blob/main/LICENSE.md)).

Release Notes

pallets/jinja (jinja2) ### [`v3.1.4`](https://togithub.com/pallets/jinja/blob/HEAD/CHANGES.rst#Version-314) [Compare Source](https://togithub.com/pallets/jinja/compare/3.1.3...3.1.4) Released 2024-05-05 - The `xmlattr` filter does not allow keys with `/` solidus, `>` greater-than sign, or `=` equals sign, in addition to disallowing spaces. Regardless of any validation done by Jinja, user input should never be used as keys to this filter, or must be separately validated first. :ghsa:`h75v-3vvj-5mfj`

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

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

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

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



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

openshift-ci[bot] commented 5 months ago

Hi @renovate[bot]. Thanks for your PR.

I'm waiting for a janus-idp member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
github-actions[bot] commented 5 months ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1234!

github-actions[bot] commented 5 months ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1234!

kim-tsao commented 5 months ago

/ok-to-test

github-actions[bot] commented 5 months ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1234!

github-actions[bot] commented 5 months ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1234!

github-actions[bot] commented 5 months ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1234!

github-actions[bot] commented 5 months ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1234!

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

github-actions[bot] commented 5 months ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1234!

kim-tsao commented 5 months ago

/lgtm /approve

openshift-ci[bot] commented 5 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kim-tsao

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/janus-idp/backstage-showcase/blob/main/OWNERS)~~ [kim-tsao] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment