[ https://issues.apache.org/jira/browse/SOLR-13982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16985392#comment-16985392 ]
Robert Muir commented on SOLR-13982: ------------------------------------ {quote} How extensively do we use unsafe evaluations in the admin UI? Can we remove those functionality from the admin UI that use such evaluations? {quote} It seems extensive: for example if you open up {{solr/webapp/web/index.html}} you see elements like this: {noformat} <li id="environment" ng-class="environment" ng-show="showEnvironment" ng-style="environment_color !== undefined ? {'background-color': environment_color} : ''"> {noformat} the stuff in the {{ng-style}} attribute looks a lot like javascript code, I am afraid somehow things are organized such that javascript code can be placed in attributes like this and it gets {{eval}}'d at runtime. So with this patch, if i find an injection, while i may not be able to simply inject inline JS directly anymore, i can probably just encode my payload instead into an attribute like this ng-style and it will get eval'ed for me: its not gonna be that much safer until we address this crazy eval'ing. I don't know enough about the frameworks being used here to know if we are just using a very naive insecure framework, and it needs to be swapped out for something else, or if we are just using it in an insecure way and there is a simple fix. Either way, seems like a biggish change to fix, and we should start somewhere IMO. > set security-related http response headers by default > ----------------------------------------------------- > > Key: SOLR-13982 > URL: https://issues.apache.org/jira/browse/SOLR-13982 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Reporter: Robert Muir > Priority: Major > Attachments: SOLR-13982.patch > > > Solr server should set some best practice http security response headers, to > e.g. protect users of the admin ui against XSS/injection/clickjacking/etc > * Content-Security-Policy > * X-Content-Type-Options > * X-XSS-Protection > * X-Frame-Options > Disabling inline javascript is important, so that e.g. if there is a bug then > injected code doesn't get executed. Unfortunately the current admin UI > dangerously relies on {{eval}}, so for now {{unsafe-eval}} must be allowed so > that everything still works. This should really be cleaned up, i have the > feeling as long as it works this way, that you can still execute stuff. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org