DisplayTag

column property attribute susceptible to cross-site scripting!!

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Incomplete
  • Affects Version/s: 1.0
  • Fix Version/s: None
  • Component/s: HTML Generation
  • Labels:
    None
  • Application server:
    tomcat 5.5.4

Description

Column tag "property" (http://displaytag.sourceforge.net/tagreference-displaytag-12.html#column) is susceptible to cross-site scripting.
It should offer a 'filter="true"' as existing in http://struts.apache.org/userGuide/struts-bean.html#write

Activity

Hide
Ralf Hauser added a comment -
a work-around is never to use the property attribute, but always a nested "struts bean:write"
Show
Ralf Hauser added a comment - a work-around is never to use the property attribute, but always a nested "struts bean:write"
Hide
fabrizio giustina added a comment -
cross site scripting means that a user could inject a script by passing parameters to the page: the "property" attribute specify a value to be fetched from an object provided server side by the application, not from a parameter. This has nothing to do with cross site scripting
Show
fabrizio giustina added a comment - cross site scripting means that a user could inject a script by passing parameters to the page: the "property" attribute specify a value to be fetched from an object provided server side by the application, not from a parameter. This has nothing to do with cross site scripting
Hide
aaron pieper added a comment -
I realize this is an old issue - but it seems like it's still pertinent? I agree with the submitter that this tag is vulnerable to cross-site scripting, and I don't understand your dismissal of the issue. You're right, the "property" attribute specifies a value which is fetched from a server-side object, but that doesn't contradict the idea that this would be relevant to cross-site scripting.

For example, one might create a web application which allows for users to submit new products, with a product description (500 character field which needs to support special characters). These products, after being retrieved from the database, might be displayed in a table uses display:column tags. Rendering these values with the column tag would render the description tag vulnerable to a cross-site scripting attack.

Assuming the software developer wants to continue using the displayTag library, the best workaround is the one Ralf Hauser suggested, but an optional filtering attribute would be much easier to use.
Show
aaron pieper added a comment - I realize this is an old issue - but it seems like it's still pertinent? I agree with the submitter that this tag is vulnerable to cross-site scripting, and I don't understand your dismissal of the issue. You're right, the "property" attribute specifies a value which is fetched from a server-side object, but that doesn't contradict the idea that this would be relevant to cross-site scripting. For example, one might create a web application which allows for users to submit new products, with a product description (500 character field which needs to support special characters). These products, after being retrieved from the database, might be displayed in a table uses display:column tags. Rendering these values with the column tag would render the description tag vulnerable to a cross-site scripting attack. Assuming the software developer wants to continue using the displayTag library, the best workaround is the one Ralf Hauser suggested, but an optional filtering attribute would be much easier to use.

People

  • Reporter:
    Anonymous
Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
2h
Original Estimate - 2 hours
Remaining:
2h
Remaining Estimate - 2 hours
Logged:
Not Specified
Time Spent - Not Specified