Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. yeswiki/yeswiki
  4. ›
  5. CVE-2026-52772

CVE-2026-52772: YesWiki has stored XSS in Bazar form-field templates via unescaped field.label / field.hint (|raw('html'))

July 9, 2026

Commit e6b66aa (“fix(bazar): leave the twig escape placeholder as is”, 2026-05-19) recognised that emitting field.label through Twig’s raw('html') filter into an HTML attribute is unsafe — Twig’s raw marker suppresses the attribute auto-escape, striptags removes <…> tags but not ", so a label containing " can break out of the attribute and inject event-handler attributes. The commit fixed tools/bazar/templates/inputs/text.twig:19 and tools/bazar/templates/inputs/textarea.twig:3.

At least seven additional templates have the same pattern and were not touched by the fix:

  • tools/bazar/templates/inputs/range.twig:19 — placeholder="{{ field.label|raw('html')|striptags }}"
  • tools/bazar/templates/inputs/email.twig:13 — placeholder="{{ field.label|raw('html')|striptags }}"
  • tools/bazar/templates/layouts/input.twig:7 — title="{{ field.hint|raw('html') }}" alt="{{ field.hint|raw('html') }}"
  • tools/bazar/templates/inputs/textarea.twig:14 — same title=/alt= pattern (the commit only fixed line 3, line 14 remains)
  • tools/bazar/templates/inputs/user.twig:41, 55 — same
  • tools/bazar/templates/inputs/bookmarklet.twig:4 — same
  • tools/bazar/templates/layouts/input.twig:9, tools/bazar/templates/layouts/field.twig:5, tools/bazar/templates/inputs/subscribe.twig:16, tools/bazar/templates/inputs/linked-entry.twig:4, tools/bazar/templates/inputs/textarea.twig:16, tools/bazar/templates/inputs/bookmarklet.twig:6 — {{ field.label|raw }} outside an attribute (label-body), with no striptags at all, so direct tag injection (<img src=x onerror=…>) executes

The layouts/input.twig and layouts/field.twig files are base layouts inherited by every Bazar field type, so a single malicious field.hint reaches into every form that uses that field.

References

  • github.com/YesWiki/yeswiki/commit/5d1a4d07fecb0706f33e5dfbbe6ff5ef1892b2a7
  • github.com/YesWiki/yeswiki/security/advisories/GHSA-xc7j-3g8q-9vh4
  • github.com/advisories/GHSA-xc7j-3g8q-9vh4
  • nvd.nist.gov/vuln/detail/CVE-2026-52772

Code Behaviors & Features

Detect and mitigate CVE-2026-52772 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.6.6

Fixed versions

  • 4.6.6

Solution

Upgrade to version 4.6.6 or above.

Impact 5.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-116: Improper Encoding or Escaping of Output
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

packagist/yeswiki/yeswiki/CVE-2026-52772.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:19:10 +0000.