From 885631f3cf4388d004617cb06d8cd582fcf78b88 Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:19:28 +0000 Subject: [PATCH] Publish Advisories GHSA-h36c-m3rf-34h9 GHSA-q9rr-h3hx-m87g GHSA-rxv5-gxqc-xx8g --- .../GHSA-h36c-m3rf-34h9.json | 84 +++++++++++++++++++ .../GHSA-q9rr-h3hx-m87g.json | 61 ++++++++++++++ .../GHSA-rxv5-gxqc-xx8g.json | 68 +++++++++++++++ 3 files changed, 213 insertions(+) create mode 100644 advisories/github-reviewed/2024/12/GHSA-h36c-m3rf-34h9/GHSA-h36c-m3rf-34h9.json create mode 100644 advisories/github-reviewed/2024/12/GHSA-q9rr-h3hx-m87g/GHSA-q9rr-h3hx-m87g.json create mode 100644 advisories/github-reviewed/2024/12/GHSA-rxv5-gxqc-xx8g/GHSA-rxv5-gxqc-xx8g.json diff --git a/advisories/github-reviewed/2024/12/GHSA-h36c-m3rf-34h9/GHSA-h36c-m3rf-34h9.json b/advisories/github-reviewed/2024/12/GHSA-h36c-m3rf-34h9/GHSA-h36c-m3rf-34h9.json new file mode 100644 index 00000000000..020f94f8cfd --- /dev/null +++ b/advisories/github-reviewed/2024/12/GHSA-h36c-m3rf-34h9/GHSA-h36c-m3rf-34h9.json @@ -0,0 +1,84 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-h36c-m3rf-34h9", + "modified": "2024-12-02T22:17:55Z", + "published": "2024-12-02T22:17:55Z", + "aliases": [ + "CVE-2024-53862" + ], + "summary": "Access to Archived Argo Workflows with Fake Token in `client` mode", + "details": "### Summary\n\nWhen using `--auth-mode=client`, Archived Workflows can be retrieved with a fake or spoofed token via the GET Workflow endpoint: `/api/v1/workflows/{namespace}/{name}`\n\nWhen using `--auth-mode=sso`, all Archived Workflows can be retrieved with a valid token via the GET Workflow endpoint: `/api/v1/workflows/{namespace}/{name}`\n\n### Details\n\nNo authentication is performed by the Server itself on `client` tokens[^1]. Authentication & authorization is instead delegated to the k8s API server.\nHowever, the [Workflow Archive](https://github.com/argoproj/argo-workflows/blob/52cca7e079a4f6d76db303ac550b1876e51b3865/server/workflowarchive/archived_workflow_server.go) does not interact with k8s, and so any token that [_looks_](https://github.com/argoproj/argo-workflows/blob/52cca7e079a4f6d76db303ac550b1876e51b3865/server/auth/mode.go#L37) [valid](https://github.com/argoproj/argo-workflows/blob/52cca7e079a4f6d76db303ac550b1876e51b3865/server/auth/gatekeeper.go#L185) will be considered authenticated, even if it is not a k8s token or even if the token has no RBAC for Argo. To handle the lack of pass-through k8s authN/authZ, the Workflow Archive specifically does [the equivalent of a `kubectl auth can-i`](https://github.com/argoproj/argo-workflows/blob/52cca7e079a4f6d76db303ac550b1876e51b3865/server/workflowarchive/archived_workflow_server.go#L50) check for respective methods.\n\nIn #12736 / v3.5.7 and #13021 / v3.5.8, the auth check was accidentally removed on the GET Workflow endpoint's fallback to archived workflows on [these lines](https://github.com/argoproj/argo-workflows/pull/13021/files#diff-a5b255abaceddc9cc20bf6da6ae92c3a5d3605d94366af503ed754c079a1171aL668-R715), allowing archived workflows to be retrieved with a fake token.\n\n### PoC\n\n#### Configuration\n\nController `ConfigMap`:\n```yaml\n config: |\n persistence:\n archive: true\n postgresql:\n database: argoworkflows\n host: db-host\n passwordSecret:\n key: postgresPassword\n name: argo-wf-postgres-credentials\n port: 5432\n tableName: argo_workflows\n userNameSecret:\n key: username\n name: argo-wf-postgres-credentials\n```\n\nServer: `--auth-mode=client`\n\n#### Reproduction\n\nVisit a completed, archived workflow URL with an invalid authorization token, this results in the workflow being displayed.\n\nFor example, directly query the API and retrieve the workflow data (where `Bearer thisisatest` is not a valid token):\n\n```sh\ncurl -H 'Authorization: Bearer thisisatest' -v http://localhost:8000/api/v1/workflows/argo/hello-world-7tv5g\n```\n\n
Results in a returned workflow:\n\n```\n* Host localhost:8000 was resolved.\n* IPv6: ::1\n* IPv4: 127.0.0.1\n* Trying [::1]:8000...\n* Connected to localhost (::1) port 8000\n> GET /api/v1/workflows/argo/hello-world-7tv5g HTTP/1.1\n> Host: localhost:8000\n> User-Agent: curl/8.7.1\n> Accept: */*\n> Authorization: Bearer thisisatest\n>\n* Request completely sent off\n< HTTP/1.1 200 OK\n< Content-Type: application/json\n< Grpc-Metadata-Content-Type: application/grpc\n< X-Ratelimit-Limit: 1000\n< X-Ratelimit-Remaining: 999\n< X-Ratelimit-Reset: Mon, 19 Aug 2024 20:44:27 UTC\n< Date: Mon, 19 Aug 2024 20:44:26 GMT\n< Transfer-Encoding: chunked\n<\n* Connection #0 to host localhost left intact\n{\n \"metadata\": {\n \"name\": \"hello-world-7tv5g\",\n \"generateName\": \"hello-world-\",\n \"namespace\": \"argo\",\n \"uid\": \"e5868ab1-f820-4a9e-9407-162346a4ccb4\",\n \"resourceVersion\": \"9982\",\n \"generation\": 3,\n \"creationTimestamp\": \"2024-08-13T23:59:20Z\",\n \"labels\": {\n \"workflows.argoproj.io/archive-strategy\": \"false\",\n \"workflows.argoproj.io/completed\": \"true\",\n \"workflows.argoproj.io/phase\": \"Succeeded\",\n \"workflows.argoproj.io/workflow-archiving-status\": \"Persisted\"\n },\n \"annotations\": {\n \"workflows.argoproj.io/description\": \"This is a simple hello world example.\\n\",\n \"workflows.argoproj.io/pod-name-format\": \"v2\"\n },\n \"managedFields\": [\n {\n \"manager\": \"argo\",\n \"operation\": \"Update\",\n \"apiVersion\": \"argoproj.io/v1alpha1\",\n \"time\": \"2024-08-13T23:59:20Z\",\n \"fieldsType\": \"FieldsV1\",\n \"fieldsV1\": {\n \"f:metadata\": {\n \"f:annotations\": {\n \".\": {},\n \"f:workflows.argoproj.io/description\": {}\n },\n \"f:generateName\": {},\n \"f:labels\": {\n \".\": {},\n \"f:workflows.argoproj.io/archive-strategy\": {}\n }\n },\n \"f:spec\": {}\n }\n },\n {\n \"manager\": \"workflow-controller\",\n \"operation\": \"Update\",\n \"apiVersion\": \"argoproj.io/v1alpha1\",\n \"time\": \"2024-08-13T23:59:30Z\",\n \"fieldsType\": \"FieldsV1\",\n \"fieldsV1\": {\n \"f:metadata\": {\n \"f:annotations\": {\n \"f:workflows.argoproj.io/pod-name-format\": {}\n },\n \"f:labels\": {\n \"f:workflows.argoproj.io/completed\": {},\n \"f:workflows.argoproj.io/phase\": {},\n \"f:workflows.argoproj.io/workflow-archiving-status\": {}\n }\n },\n \"f:status\": {}\n }\n }\n ]\n },\n \"spec\": {\n \"templates\": [\n {\n \"name\": \"hello-world\",\n \"inputs\": {},\n \"outputs\": {},\n \"metadata\": {},\n \"container\": {\n \"name\": \"\",\n \"image\": \"busybox\",\n \"command\": [\n \"echo\"\n ],\n \"args\": [\n \"hello world\"\n ],\n \"resources\": {}\n }\n }\n ],\n \"entrypoint\": \"hello-world\",\n \"arguments\": {},\n \"serviceAccountName\": \"argo-workflow\"\n },\n \"status\": {\n \"phase\": \"Succeeded\",\n \"startedAt\": \"2024-08-13T23:59:20Z\",\n \"finishedAt\": \"2024-08-13T23:59:30Z\",\n \"progress\": \"1/1\",\n \"nodes\": {\n \"hello-world-7tv5g\": {\n \"id\": \"hello-world-7tv5g\",\n \"name\": \"hello-world-7tv5g\",\n \"displayName\": \"hello-world-7tv5g\",\n \"type\": \"Pod\",\n \"templateName\": \"hello-world\",\n \"templateScope\": \"local/hello-world-7tv5g\",\n \"phase\": \"Succeeded\",\n \"startedAt\": \"2024-08-13T23:59:20Z\",\n \"finishedAt\": \"2024-08-13T23:59:24Z\",\n \"progress\": \"1/1\",\n \"resourcesDuration\": {\n \"cpu\": 0,\n \"memory\": 3\n },\n \"outputs\": {\n \"exitCode\": \"0\"\n },\n \"hostNodeName\": \"kind-control-plane\"\n }\n },\n \"conditions\": [\n {\n \"type\": \"PodRunning\",\n \"status\": \"False\"\n },\n {\n \"type\": \"Completed\",\n \"status\": \"True\"\n }\n ],\n \"resourcesDuration\": {\n \"cpu\": 0,\n \"memory\": 3\n },\n \"artifactRepositoryRef\": {\n \"default\": true,\n \"artifactRepository\": {}\n },\n \"artifactGCStatus\": {\n \"notSpecified\": true\n },\n \"taskResultsCompletionStatus\": {\n \"hello-world-7tv5g\": true\n }\n }\n}%\n```\n\n
\n\n\n### Impact\n\nUsers of the Server with `--auth-mode=client` and with `persistence.archive: true` are vulnerable to having Archived Workflows retrieved with a fake or spoofed token.\n\nUsers of the Server with `--auth-mode=sso` and with `persistence.archive: true` are vulnerable to users being able to access workflows they could not access before archiving.\n\n[^1]: `sso` tokens, on the other hand, are [immediately \"authorized\"](https://github.com/argoproj/argo-workflows/blob/52cca7e079a4f6d76db303ac550b1876e51b3865/server/auth/gatekeeper.go#L207). The naming in the codebase is a bit confusing; it would be more appropriate to say \"authenticated\" in this case, as authorization is via SSO RBAC / SA matching / k8s API server. In this same section of the codebase, the `client` tokens are not authenticated, they are only validated. Authentication and authorization is done simultaneously for `client` tokens via the k8s API server.", + "severity": [ + { + "type": "CVSS_V4", + "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "Go", + "name": "github.com/argoproj/argo-workflows/v3" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "3.5.7" + }, + { + "fixed": "3.5.13" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "Go", + "name": "github.com/argoproj/argo-workflows/v3" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "3.6.0" + }, + { + "fixed": "3.6.2" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/argoproj/argo-workflows/security/advisories/GHSA-h36c-m3rf-34h9" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-53862" + }, + { + "type": "WEB", + "url": "https://github.com/argoproj/argo-workflows/pull/13021/files#diff-a5b255abaceddc9cc20bf6da6ae92c3a5d3605d94366af503ed754c079a1171aL668-R715" + }, + { + "type": "PACKAGE", + "url": "https://github.com/argoproj/argo-workflows" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-200" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2024-12-02T22:17:55Z", + "nvd_published_at": "2024-12-02T16:15:14Z" + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2024/12/GHSA-q9rr-h3hx-m87g/GHSA-q9rr-h3hx-m87g.json b/advisories/github-reviewed/2024/12/GHSA-q9rr-h3hx-m87g/GHSA-q9rr-h3hx-m87g.json new file mode 100644 index 00000000000..d23121b34a7 --- /dev/null +++ b/advisories/github-reviewed/2024/12/GHSA-q9rr-h3hx-m87g/GHSA-q9rr-h3hx-m87g.json @@ -0,0 +1,61 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-q9rr-h3hx-m87g", + "modified": "2024-12-02T22:17:18Z", + "published": "2024-12-02T22:17:18Z", + "aliases": [ + "CVE-2024-53264" + ], + "summary": "BunkerWeb has Open Redirect Vulnerability in Loading Page", + "details": "### Summary:\nA open redirect vulnerability exists in the loading endpoint, allowing attackers to redirect authenticated users to arbitrary external URLs via the \"next\" parameter.\n\n### Details:\nThe loading endpoint accepts and uses an unvalidated \"next\" parameter for redirects:\n\n### PoC:\nVisit: `/loading?next=https://google.com` while authenticated. The page will redirect to google.com.\n\n### Impact:\nThis vulnerability could be used in phishing attacks by redirecting users from a legitimate application URL to malicious sites.", + "severity": [ + { + "type": "CVSS_V4", + "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X" + } + ], + "affected": [ + { + "package": { + "ecosystem": "Go", + "name": "github.com/bunkerity/bunkerweb" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "1.5.11" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/bunkerity/bunkerweb/security/advisories/GHSA-q9rr-h3hx-m87g" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-53264" + }, + { + "type": "PACKAGE", + "url": "https://github.com/bunkerity/bunkerweb" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-601" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2024-12-02T22:17:18Z", + "nvd_published_at": "2024-11-27T19:15:33Z" + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2024/12/GHSA-rxv5-gxqc-xx8g/GHSA-rxv5-gxqc-xx8g.json b/advisories/github-reviewed/2024/12/GHSA-rxv5-gxqc-xx8g/GHSA-rxv5-gxqc-xx8g.json new file mode 100644 index 00000000000..66ae348dc44 --- /dev/null +++ b/advisories/github-reviewed/2024/12/GHSA-rxv5-gxqc-xx8g/GHSA-rxv5-gxqc-xx8g.json @@ -0,0 +1,68 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-rxv5-gxqc-xx8g", + "modified": "2024-12-02T22:18:27Z", + "published": "2024-12-02T22:18:27Z", + "aliases": [ + "CVE-2024-53989" + ], + "summary": "rails-html-sanitizer has XSS vulnerability with certain configurations", + "details": "## Summary\n\nThere is a possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer 1.6.0 when used with Rails >= 7.1.0.\n\n* Versions affected: 1.6.0\n* Not affected: < 1.6.0\n* Fixed versions: 1.6.1\n\n## Impact\n\nA possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer may allow an attacker to inject content if HTML5 sanitization is enabled and the application developer has overridden the sanitizer's allowed tags in the following way:\n\n- the \"noscript\" element is explicitly allowed\n\nCode is only impacted if Rails is configured to use HTML5 sanitization, please see documentation for [`config.action_view.sanitizer_vendor`](https://guides.rubyonrails.org/configuring.html#config-action-view-sanitizer-vendor) and [`config.action_text.sanitizer_vendor`](https://guides.rubyonrails.org/configuring.html#config-action-text-sanitizer-vendor) for more information on these configuration options.\n\nThe default configuration is to disallow all of these elements. Code is only impacted if allowed tags are being overridden. Applications may be doing this in a few different ways:\n\n1. using application configuration to configure Action View sanitizers' allowed tags:\n\n ```ruby\n # In config/application.rb\n config.action_view.sanitized_allowed_tags = [\"noscript\"]\n ```\n\n see https://guides.rubyonrails.org/configuring.html#configuring-action-view\n\n2. using a `:tags` option to the Action View helper `sanitize`:\n\n ```\n <%= sanitize @comment.body, tags: [\"noscript\"] %>\n ```\n\n see https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-sanitize\n\n3. setting Rails::HTML5::SafeListSanitizer class attribute `allowed_tags`:\n\n ```ruby\n # class-level option\n Rails::HTML5::SafeListSanitizer.allowed_tags = [\"noscript\"]\n ```\n\n (note that this class may also be referenced as `Rails::Html::SafeListSanitizer`)\n\n4. using a `:tags` options to the Rails::HTML5::SafeListSanitizer instance method `sanitize`:\n\n ```ruby\n # instance-level option\n Rails::HTML5::SafeListSanitizer.new.sanitize(@article.body, tags: [\"noscript\"])\n ```\n\n (note that this class may also be referenced as `Rails::Html::SafeListSanitizer`)\n\n5. setting ActionText::ContentHelper module attribute `allowed_tags`:\n\n ```ruby\n ActionText::ContentHelper.allowed_tags = [\"noscript\"]\n ```\n\nAll users overriding the allowed tags by any of the above mechanisms to include \"noscript\" should either upgrade or use one of the workarounds.\n\n\n## Workarounds\n\nAny one of the following actions will work around this issue:\n\n- Remove \"noscript\" from the overridden allowed tags,\n- Or, downgrade sanitization to HTML4 (see documentation for [`config.action_view.sanitizer_vendor`](https://guides.rubyonrails.org/configuring.html#config-action-view-sanitizer-vendor) and [`config.action_text.sanitizer_vendor`](https://guides.rubyonrails.org/configuring.html#config-action-text-sanitizer-vendor) for more information).\n\n\n## References\n\n- [CWE - CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (4.9)](https://cwe.mitre.org/data/definitions/79.html)\n- Original report: https://hackerone.com/reports/2509647\n\n## Credit\n\nThis vulnerability was responsibly reported by HackerOne user [@taise](https://hackerone.com/taise?type=user).\n\n", + "severity": [ + { + "type": "CVSS_V4", + "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X" + } + ], + "affected": [ + { + "package": { + "ecosystem": "RubyGems", + "name": "rails-html-sanitizer" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "1.6.0" + }, + { + "fixed": "1.6.1" + } + ] + } + ], + "versions": [ + "1.6.0" + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-rxv5-gxqc-xx8g" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-53989" + }, + { + "type": "WEB", + "url": "https://github.com/rails/rails-html-sanitizer/commit/16251735e36ebdc302e2f90f2a39cad56879414f" + }, + { + "type": "PACKAGE", + "url": "https://github.com/rails/rails-html-sanitizer" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-79" + ], + "severity": "LOW", + "github_reviewed": true, + "github_reviewed_at": "2024-12-02T22:18:27Z", + "nvd_published_at": "2024-12-02T21:15:11Z" + } +} \ No newline at end of file