GHSA-45HJ-9X76-WP9G
Vulnerability from github – Published: 2026-01-13 21:53 – Updated: 2026-01-14 19:50Summary
This vulnerability allows a user i.e a free plan user to get more than the desired subdomains due to lack of db transaction lock mechanisms in https://github.com/akinloluwami/outray/blob/main/apps/web/src/routes/api/%24orgSlug/subdomains/index.ts
Details
- The affected code-:
//Race condition
const [subscription] = await db
.select()
.from(subscriptions)
.where(eq(subscriptions.organizationId, organization.id));
const currentPlan = subscription?.plan || "free";
const planLimits = getPlanLimits(currentPlan as any);
const subdomainLimit = planLimits.maxSubdomains;
const existingSubdomains = await db
.select()
.from(subdomains)
.where(eq(subdomains.organizationId, organization.id));
if (existingSubdomains.length >= subdomainLimit) {
return json(
{
error: `Subdomain limit reached. The ${currentPlan} plan allows ${subdomainLimit} subdomain${subdomainLimit > 1 ? "s" : ""}.`,
},
{ status: 403 },
);
}
const existing = await db
.select()
.from(subdomains)
.where(eq(subdomains.subdomain, subdomain))
.limit(1);
if (existing.length > 0) {
return json({ error: "Subdomain already taken" }, { status: 409 });
}
const [newSubdomain] = await db
.insert(subdomains)
.values({
id: crypto.randomUUID(),
subdomain,
organizationId: organization.id,
userId: session.user.id,
})
.returning();
- The first part of the code checks the user plan and determine his/her existing_domains without locking the transaction and allowing it to run.
const existingSubdomains = await db
.select()
.from(subdomains)
.where(eq(subdomains.organizationId, organization.id));
- The other part of the code checks if the desired domain is more than the limit.
if (existingSubdomains.length >= subdomainLimit) {
return json(
{
error: `Subdomain limit reached. The ${currentPlan} plan allows ${subdomainLimit} subdomain${subdomainLimit > 1 ? "s" : ""}.`,
},
{ status: 403 },
);
}
- Finally, it inserts the subdomain also after the whole check without locking transactions.
const [newSubdomain] = await db
.insert(subdomains)
.values({
id: crypto.randomUUID(),
subdomain,
organizationId: organization.id,
userId: session.user.id,
})
.returning();
- An attacker can exploit this by making parallel requests to the same endpoint and if the second request reads row
subdomainsbefore theINSERTstatement of request one is made.It allows the attacker to act on a not yet updated row which bypasses the checks and allow the attacker to get more subdomains.For example-:
Parallel request 1 Parallel Request 2
| |
checks for Checks the not yet updated
available subdomain row and bypasses the logic checks
and determines if it is more than limit
| |
Inserts subdomain and calls it a day Also inserts the subdomain
- The attack focuses on exploiting the race window between reading and writing the db rows.
PoC
- Intercept with Burp proxy,pass to
Repeaterand create multiple requests in a single batch with different subdomain names as seen below. Lastly, send the requests inparallel.
- Result-:
Impact
The vulnerability provides an infiinite supply of domains to users bypassing the need for subscription
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "outray"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.1.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-22819"
],
"database_specific": {
"cwe_ids": [
"CWE-366"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-13T21:53:30Z",
"nvd_published_at": "2026-01-14T18:16:42Z",
"severity": "MODERATE"
},
"details": "### Summary\nThis vulnerability allows a user i.e a free plan user to get more than the desired subdomains due to lack of db transaction lock mechanisms in `https://github.com/akinloluwami/outray/blob/main/apps/web/src/routes/api/%24orgSlug/subdomains/index.ts`\n\n### Details\n- The affected code-:\n\n```ts\n//Race condition\n const [subscription] = await db\n .select()\n .from(subscriptions)\n .where(eq(subscriptions.organizationId, organization.id));\n\n const currentPlan = subscription?.plan || \"free\";\n const planLimits = getPlanLimits(currentPlan as any);\n const subdomainLimit = planLimits.maxSubdomains;\n\n const existingSubdomains = await db\n .select()\n .from(subdomains)\n .where(eq(subdomains.organizationId, organization.id));\n\n if (existingSubdomains.length \u003e= subdomainLimit) {\n return json(\n {\n error: `Subdomain limit reached. The ${currentPlan} plan allows ${subdomainLimit} subdomain${subdomainLimit \u003e 1 ? \"s\" : \"\"}.`,\n },\n { status: 403 },\n );\n }\n\n const existing = await db\n .select()\n .from(subdomains)\n .where(eq(subdomains.subdomain, subdomain))\n .limit(1);\n\n if (existing.length \u003e 0) {\n return json({ error: \"Subdomain already taken\" }, { status: 409 });\n }\n\n const [newSubdomain] = await db\n .insert(subdomains)\n .values({\n id: crypto.randomUUID(),\n subdomain,\n organizationId: organization.id,\n userId: session.user.id,\n })\n .returning();\n```\n\n- The first part of the code checks the user plan and determine his/her existing_domains without locking the transaction and allowing it to run.\n```ts\nconst existingSubdomains = await db\n .select()\n .from(subdomains)\n .where(eq(subdomains.organizationId, organization.id));\n```\n\n- The other part of the code checks if the desired domain is more than the limit.\n\n```ts\nif (existingSubdomains.length \u003e= subdomainLimit) {\n return json(\n {\n error: `Subdomain limit reached. The ${currentPlan} plan allows ${subdomainLimit} subdomain${subdomainLimit \u003e 1 ? \"s\" : \"\"}.`,\n },\n { status: 403 },\n );\n }\n```\n\n- Finally, it inserts the subdomain also after the whole check without locking transactions.\n\n```ts\nconst [newSubdomain] = await db\n .insert(subdomains)\n .values({\n id: crypto.randomUUID(),\n subdomain,\n organizationId: organization.id,\n userId: session.user.id,\n })\n .returning();\n```\n- An attacker can exploit this by making parallel requests to the same endpoint and if the second request reads row `subdomains` before the `INSERT` statement of request one is made.It allows the attacker to act on a not yet updated row which bypasses the checks and allow the attacker to get more subdomains.For example-:\n\n```\n Parallel request 1 Parallel Request 2 \n | |\nchecks for Checks the not yet updated\navailable subdomain row and bypasses the logic checks\nand determines if it is more than limit\n | |\nInserts subdomain and calls it a day Also inserts the subdomain\n```\n- The attack focuses on exploiting the race window between reading and writing the db rows.\n\n### PoC\n\n- Intercept with Burp proxy,pass to `Repeater` and create multiple requests in a single batch with different subdomain names as seen below. Lastly, send the requests in `parallel`.\n\n\u003cimg width=\"1844\" height=\"855\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f46d5993-31bd-4b96-902a-b2de5b0518bd\" /\u003e\n\n- Result-:\n\n\u003cimg width=\"1905\" height=\"977\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4c877de2-4b55-46f4-9f1c-78590dfebefc\" /\u003e\n\n\n### Impact\nThe vulnerability provides an infiinite supply of domains to users bypassing the need for subscription",
"id": "GHSA-45hj-9x76-wp9g",
"modified": "2026-01-14T19:50:51Z",
"published": "2026-01-13T21:53:30Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/akinloluwami/outray/security/advisories/GHSA-45hj-9x76-wp9g"
},
{
"type": "WEB",
"url": "https://github.com/outray-tunnel/outray/security/advisories/GHSA-45hj-9x76-wp9g"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-22819"
},
{
"type": "WEB",
"url": "https://github.com/outray-tunnel/outray/commit/08c61495761349e7fd2965229c3faa8d7b1c1581"
},
{
"type": "WEB",
"url": "https://github.com/outray-tunnel/outray/commit/73e8a09575754fb4c395438680454b2ec064d1d6"
},
{
"type": "PACKAGE",
"url": "https://github.com/akinloluwami/outray"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H",
"type": "CVSS_V3"
}
],
"summary": "Outray has a Race Condition in the cli\u0027s webapp"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.