Skip to content

Security: Harden HTML event attribute filtering - refs GHSA-9wff-vv7j-p3cc - #9243

Merged
christianbeeznest merged 1 commit into
chamilo:1.11.xfrom
christianbeeznest:security/auto-fix-GHSA-9wff-vv7j-p3cc
Oct 16, 2026
Merged

christianbeeznest merged 1 commit into
chamilo:1.11.xfrom
christianbeeznest:security/auto-fix-GHSA-9wff-vv7j-p3cc

Conversation

@christianbeeznest

Copy link
Copy Markdown
Contributor

Summary

Hardens the HTML event attribute filter against malformed event-handler attributes that can bypass the existing RemoveOnAttributes regular expression.

The filter now:

  • handles event attributes separated by /
  • handles event attributes immediately following quoted attribute values
  • handles repeated / separators
  • keeps filtering limited to HTML tags
  • preserves legitimate attribute values and plain text containing similar strings

Verification

Validated directly against RemoveOnAttributes::filter():

  • 8 malformed event-attribute variants were removed
  • 5 legitimate-content cases were preserved
  • php -l passed
  • git diff --check passed

Only the following file is changed:

src/Chamilo/CoreBundle/Component/HTMLPurifier/Filter/RemoveOnAttributes.php

The full Survey browser flow was not exercised as part of this patch.

Refs GHSA-9wff-vv7j-p3cc

@christianbeeznest
christianbeeznest merged commit 599effd into chamilo:1.11.x Oct 16, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant