SafeBuffer#% does not propagate the @html_unsafe flag to the newly created buffer. If a SafeBuffer is mutated in place (e.g. via gsub!) and then formatted with % using untrusted arguments, the result incorrectly reports html_safe? == true, bypassing ERB auto-escaping and possibly leading to XSS.
The fixed releases are available at the normal locations.
This issue was responsibly reported by @ch4n3-yoon
{
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-23T20:53:28Z",
"nvd_published_at": "2026-03-24T00:16:28Z",
"severity": "MODERATE"
}