From 545a2f06ae00ddc03ad2896f511224a0baa0d369 Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 22:07:57 +0000 Subject: [PATCH] Publish Advisories GHSA-hg9j-64wp-m9px GHSA-qxp5-gwg8-xv66 --- .../GHSA-hg9j-64wp-m9px.json | 88 +++++++++++++++++++ .../GHSA-qxp5-gwg8-xv66.json | 68 ++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 advisories/github-reviewed/2025/03/GHSA-hg9j-64wp-m9px/GHSA-hg9j-64wp-m9px.json create mode 100644 advisories/github-reviewed/2025/03/GHSA-qxp5-gwg8-xv66/GHSA-qxp5-gwg8-xv66.json diff --git a/advisories/github-reviewed/2025/03/GHSA-hg9j-64wp-m9px/GHSA-hg9j-64wp-m9px.json b/advisories/github-reviewed/2025/03/GHSA-hg9j-64wp-m9px/GHSA-hg9j-64wp-m9px.json new file mode 100644 index 00000000000..62eb3b5e27e --- /dev/null +++ b/advisories/github-reviewed/2025/03/GHSA-hg9j-64wp-m9px/GHSA-hg9j-64wp-m9px.json @@ -0,0 +1,88 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-hg9j-64wp-m9px", + "modified": "2025-03-12T22:06:16Z", + "published": "2025-03-12T22:06:16Z", + "aliases": [ + "CVE-2025-27794" + ], + "summary": "Flarum Vulnerable to Session Hijacking via Authoritative Subdomain Cookie Overwrite", + "details": "## **Summary** \nA session hijacking vulnerability exists when an attacker-controlled **authoritative subdomain** under a parent domain (e.g., `subdomain.host.com`) sets cookies scoped to the parent domain (`.host.com`). This allows session token replacement for applications hosted on sibling subdomains (e.g., `community.host.com`) if session tokens aren't rotated post-authentication. \n\n**Key Constraints**: \n- Attacker must control **any subdomain** under the parent domain (e.g., `evil.host.com` or `x.y.host.com`). \n- Parent domain must **not** be on the [Public Suffix List](https://publicsuffix.org/).\n\nDue to non-existent session token rotation after authenticating we can theoretically reproduce the vulnerability by using browser dev tools, but due to the browser's security measures this does not seem to be exploitable as described.\n\n---\n\n## **Proof of Concept (Deno)** \n```ts\nDeno.serve({\n port: 8000, // default\n hostname: 'localhost',\n onListen: (o) => console.log(`Server started at http://${o.hostname}:${o.port}`, o),\n },\n async (req) => (console.log(req), new Response(\n `You've been served! You came from ${req.headers.get('referer')}`,\n {\n //status: 302, // would redirect user to page they came from\n status: 200,\n headers: {\n 'set-cookie': 'session_cookie=mytoken; Domain=.deno.dev; Secure; HttpOnly',\n 'location': req.headers.get('referer')\n }\n }\n ))\n);\n```\n\n### **Attack Flow** \n1. **Attacker Setup**: Hosts server at `evil.host.com`.\n2. **Harvest Session Token**: Attacker visits `community.host.com` to get a session token for himself to replace the victim's token with his own.\n3. **Victim Interaction**: User clicks link to `https://evil.host.com`. \n4. **Cookie Override**: Server sets cookie with `Domain=.host.com` and the harvested token from step 2. \n5. **Session Hijacking**: Victim's future requests to `community.host.com` use attacker's token. \n\n---\n\n## **Why Reverse DNS Subdomains Fail** \nBrowsers block cookie setting for parent domains unless: \n1. **Authoritative Subdomain**: Server must belong to a direct child domain (e.g., `a.host.com`, not `x.y.host.com`). \n2. **Public Suffix Exclusion**: If `host.com` is on the Public Suffix List (e.g., like `github.io`), browsers block cross-subdomain cookies. \n\n**Example**: \n- ❌ `123.cust.dynamic.host.com` → Cannot set `Domain=.host.com`. \n- ✅ `evil.host.com` → Can set `Domain=.host.com` (if not on PSL). \n\n---\n\n## **Browser Security Behavior** \n### 1. **Cookie Domain Validation** \nPer [RFC 6265 §5.3](https://datatracker.ietf.org/doc/html/rfc6265#section-5.3): \n> Cookies can only be set for domains the server is authoritative for. \n\n### 2. **Public Suffix List (PSL)** \nDomains like `host.com` on the PSL trigger browser protections: \n> Subdomains of PSL-listed domains cannot set cookies for parent domains. \n\n**Verification**: \n- Check PSL status: https://publicsuffix.org/list/ \n\n---\n\n## **Impact** \n- **Account Takeover**: Attacker gains authenticated session access.\n- **Data Exposure**: Email, private messages, and other personal data exposed.\n- **Exploitable Only If**: \n - Parent domain is **not** PSL-listed. \n - Attacker controls **direct child subdomain** (e.g., `evil.host.com`). \n\n---\n\n## **Remediation** \n1. **Session Token Rotation**: \n ```ts\n // After authentication:\n invalidateOldSession();\n const newToken = generateToken();\n ```\n2. **Cookie Scoping (already in place)**: \n ```ts\n // Restrict cookies to explicit subdomain:\n \"Set-Cookie\": \"session=token; Domain=community.host.com; Secure; HttpOnly; SameSite=Lax\";\n ```\n3. **Public Suffix Registration**: \n Add `host.com` to the Public Suffix List via [PSL Submission](https://publicsuffix.org/submit/). \n\n---\n\n## **Revised Vulnerability Criteria** \n**Prerequisites**: \n- Attacker controls authoritative subdomain (e.g., `evil.host.com`). \n- Parent domain (`host.com`) is **not** PSL-listed. \n- Session tokens persist post-authentication. \n\n---\n\n## **References** \n- [RFC 6265: HTTP Cookie Handling](https://tools.ietf.org/html/rfc6265) \n- [Public Suffix List](https://publicsuffix.org/)", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "Packagist", + "name": "flarum/core" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "1.8.10" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "Packagist", + "name": "flarum/framework" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "1.8.10" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/flarum/framework/security/advisories/GHSA-hg9j-64wp-m9px" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-27794" + }, + { + "type": "WEB", + "url": "https://github.com/flarum/framework/commit/a05aaea3ee1e0a8b870935183193cd6052f1d402" + }, + { + "type": "PACKAGE", + "url": "https://github.com/flarum/framework" + }, + { + "type": "WEB", + "url": "https://github.com/flarum/framework/releases/tag/v1.8.10" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-74" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2025-03-12T22:06:16Z", + "nvd_published_at": "2025-03-12T14:15:17Z" + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2025/03/GHSA-qxp5-gwg8-xv66/GHSA-qxp5-gwg8-xv66.json b/advisories/github-reviewed/2025/03/GHSA-qxp5-gwg8-xv66/GHSA-qxp5-gwg8-xv66.json new file mode 100644 index 00000000000..d0b170cacb4 --- /dev/null +++ b/advisories/github-reviewed/2025/03/GHSA-qxp5-gwg8-xv66/GHSA-qxp5-gwg8-xv66.json @@ -0,0 +1,68 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-qxp5-gwg8-xv66", + "modified": "2025-03-12T22:06:40Z", + "published": "2025-03-12T22:06:40Z", + "aliases": [ + "CVE-2025-22870" + ], + "summary": "HTTP Proxy bypass using IPv6 Zone IDs in golang.org/x/net", + "details": "Matching of hosts against proxy patterns can improperly treat an IPv6 zone ID as a hostname component. For example, when the NO_PROXY environment variable is set to \"*.example.com\", a request to \"[::1%25.example.com]:80` will incorrectly match and not be proxied.", + "severity": [], + "affected": [ + { + "package": { + "ecosystem": "Go", + "name": "golang.org/x/net" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "0.36.0" + } + ] + } + ] + } + ], + "references": [ + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-22870" + }, + { + "type": "PACKAGE", + "url": "https://go-review.googlesource.com/q/project:net" + }, + { + "type": "WEB", + "url": "https://go.dev/cl/654697" + }, + { + "type": "WEB", + "url": "https://go.dev/issue/71984" + }, + { + "type": "WEB", + "url": "https://pkg.go.dev/vuln/GO-2025-3503" + }, + { + "type": "WEB", + "url": "http://www.openwall.com/lists/oss-security/2025/03/07/2" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-20" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2025-03-12T22:06:40Z", + "nvd_published_at": "2025-03-12T19:15:38Z" + } +} \ No newline at end of file