Keep a copy of original img src in _filter_html_image_secure_process()

Created on 28 April 2016, almost 9 years ago
Updated 21 March 2025, 13 days ago

This is a forward port of #2714775: Store location of original image โ†’ .

For Drupal.org, the WYSIWYG will be set up to use the filtered HTML, so a potentially malicious image isn't rendered within the WYSIWYG editor for another user. Saving the original image src in a dummy attribute doesn't throw the data away completely.

๐Ÿ“Œ Task
Status

Postponed: needs info

Version

11.0 ๐Ÿ”ฅ

Component

filter.module

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States drumm NY, US

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Just following up if still valid? If no follow up could close in 3 months

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States drumm NY, US

    This looks like it can be closed. The original image is still rendered in WYSIWYG instead of being filtered out, thatโ€™s not ideal. It isnโ€™t showing what you will get on save, and could be used as an entry point to cross-site request forgery (CSRF) attacks. The worst example of the attack, <img src="/user/logout"> is mitigated since the logout route now has a token to prevent CSRF attacks.

    Since the WYSIWYG is requesting any img src URL, that could have anyone editing having requests made on their behalf. However, CSRF is generally prevented on the receiving end, as was done with /user/logout. I suppose there could be a privacy concern, since a 3rd-party request could still be made. Iโ€™m sure this was all handled in previous issues and the current state is okay.

Production build 0.71.5 2024