abpframework / abpframework/abp

Html encode text fields in response against XSS attacks (Cross Site Scripting)

Open
#7,751 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

abp-framework feature priority:high
Dominant language
C#
Stars
14.4k
Forks
3.7k
Avg merge
15h 32m
Merged PRs (30d)
106

Description

Prevent client-side scripts to run in web browser.
Automatically encode HTML or escape chars in Ajax responses so that code in <script></script> tags cannot be evaluated. There maybe multiple targeted devices that's why encoding should be done only in web layer.
According to me, this should be done in the response not in the request because if a 3rd party is inserting an infected data to the database, ABP should encode those as well.

When you create a new role with the name : <script>alert(1)</script>
All the pages that return role name, evaluates this script. eg : https://localhost:44303/Identity/Users/CreateModal

image
image
image
image

https://docs.microsoft.com/en-us/aspnet/core/security/cross-site-scripting
https://docs.microsoft.com/en-us/aspnet/core/security/anti-request-forgery

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the reported Identity/Users/CreateModal entry point and trace how its Ajax response is produced in the web layer. Verify how role names are rendered, then confirm that a role containing script tags is returned safely and is not evaluated in the browser without breaking other response clients.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
security, web-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.