Skip to content

Security: XSS Vulnerability in Media Library Templates #3865

@saeedvir

Description

@saeedvir

🚨 Security: XSS Vulnerability in Media Library Templates

Severity: High

Type: Cross-Site Scripting (XSS)

Description

The media library Blade templates contain XSS vulnerabilities due to unescaped output of the $attributeString variable using {!! !!} syntax.

Affected Files

  • resources/views/vendor/media-library/image.blade.php
  • resources/views/vendor/media-library/responsiveImage.blade.php
  • resources/views/vendor/media-library/responsiveImageWithPlaceholder.blade.php

Vulnerable Code

<img{!! $attributeString !!}[if($loadingAttributeValue)](cci:4://file://if($loadingAttributeValue):0:0-0:0) loading="{{ $loadingAttributeValue }}"[endif](cci:4://file://endif:0:0-0:0) src="{{ $media->getUrl($conversion) }}" alt="{{ $media->name }}">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions