dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
858 stars 467 forks source link

Restriction Enhancement for HTML Format in Content via REST #27471

Open bryanboza opened 8 months ago

bryanboza commented 8 months ago

Problem Statement

Currently, dotCMS allows HTML format to be set in content added via REST without proper restrictions. This poses a security risk and may lead to unintended consequences such as cross-site scripting (XSS) vulnerabilities. There is a need to enhance the system to restrict or validate HTML input more effectively.

Screenshot 2024-01-30 at 1 06 43 PM

Steps to Reproduce

Acceptance Criteria

dotCMS Version

Tested on master // Docker // FF

Proposed Objective

Quality Assurance

Proposed Priority

Priority 1 - Show Stopper

bryanboza commented 8 months ago

Also we need to handle other cases when you try to execute an script

Screenshot 2024-01-30 at 1 21 53 PM

mbiuki commented 8 months ago

It looks like the script is not running and sanitization works good on that front but for other tags we probably should address it.

mbiuki commented 8 months ago

@bryanboza Did you try validation regex? The description and title are text fields. You need to set the regex in the text field while creating the content type. There is regex for each such as text, title, description, search and so on.

image (10)

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

prestonso commented 3 months ago

@bryanboza @mbiuki Any updates here?