XSS vulnerability in link Twig function

Created on 3 February 2025, 17 days ago

Problem/Motivation

The link Twig function seems to have a vulnerability similar to SA-CONTRIB-2023-041 .

Steps to reproduce

{{ link('<script>alert(`XSS`);</script>', 'bar', '') }}

Proposed resolution

It probably needs a fix similar to this: https://git.drupalcode.org/project/unified_twig_ext/-/commit/6e8dcbfe6f4...

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇫🇷France prudloff Lille

Live updates comments and jobs are added and updated live.
  • Security

    It is used for security vulnerabilities which do not need a security advisory. For example, security issues in projects which do not have security advisory coverage, or forward-porting a change already disclosed in a security advisory. See Drupal’s security advisory policy for details. Be careful publicly disclosing security vulnerabilities! Use the “Report a security vulnerability” link in the project page’s sidebar. See how to report a security issue for details.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024