Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 155197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:06:47+00:00 2026-05-11T10:06:47+00:00

In my application I am allowing users to upload their css style sheets so

  • 0

In my application I am allowing users to upload their css style sheets so they can applied to templates. The css is written as an internal style sheet, because at this time I would not like to expose the css style sheet to other users.

That creates room for users to include malicious code into the css file. Initially my plan was to convert all ‘<‘ and ‘>’, but that is needed in the css syntax. I am after a white list solution, since it won’t be feasible to exhaustively eliminate unwanted characters.

Any suggestions for implementing security measures to this scenario?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:06:48+00:00Added an answer on May 11, 2026 at 10:06 am

    You should definitely also filter out at least IE expressions and FF -moz-binding properties… both can be used to run (potentionally malicious) javascript using css.

    This cheat sheet contains the most obvious XSS tactics, including some CSS ones.

    The safest solution would probably be whitelisting as you suggested (if it is acceptable to limit users to only use whitelisted properties).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm allowing authenticated users to upload image files with my PHP application. Assume I've
I have created an application where I am allowing users to log their Workouts.
I have an application that allows users to upload images. The test case I
In our application, we are allowing users to open files and directories. Java 6
I am allowing users to embed videos on their page, but just in case
Currently I'm allowed users to add application/x-shockwave-flash objects to their profiles in my website.
In a web application I have an upload folder where all users' files are
What I do with my application is allowing users to discover POI on Google
I'm trying to design a model for a application allowing 2 people to bet
I am doing file-upload for a web-application (running on unix/linux). I'm wondering if there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.