Real Name
The module does not properly clean the data users enter into their profiles. Someone with an ordinary account could add harmful template code to their profile which runs when their name is shown. They could uncover hidden data but could not change anything else on the site.
- Who could do thisOnly someone with a login on your site.
- Does it apply to youA site is affected if it is set up to use a name pattern that includes user supplied data and the attacker can edit that data on their own account.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this moderately critical. Include it in your next routine update, within the month.
Tell your developerUpdate Real Name to 2.0.1.
For developers: what the fix changed
The fix introduces a PatternRenderer service in src/PatternRenderer.php that compiles the real name pattern into a Twig template and passes user token values as context variables, preventing user input from being evaluated as Twig code. This replaces the direct token replacement and Twig rendering in the realname_update function of realname.module.
Also in this release The release also fixes a PHP deprecation warning for an implicitly nullable parameter and adds automated tests.
realname.api.php+3 −0realname.install+7 −0 fixrealname.module+9 −13 fixrealname.services.yml+8 −0 fixsrc/PatternRenderer.php+192 −0 fixsrc/Plugin/Action/RealnameUpdateRealname.php+1 −1