[ https://issues.apache.org/jira/browse/WW-5407?focusedWorklogId=914381&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-914381 ]
ASF GitHub Bot logged work on WW-5407: -------------------------------------- Author: ASF GitHub Bot Created on: 12/Apr/24 10:36 Start Date: 12/Apr/24 10:36 Worklog Time Spent: 10m Work Description: kusalk commented on code in PR #234: URL: https://github.com/apache/struts-site/pull/234#discussion_r1562373763 ########## source/security/index.md: ########## @@ -433,10 +433,16 @@ with other known dangerous classes or packages in your application. We additionally recommend enabling the following options (enabled by default in 7.0). - * `struts.ognl.allowStaticFieldAccess=false` - static methods are always blocked, but static fields can also optionally be blocked - * `struts.disallowProxyMemberAccess=true` - disallow proxied objects from being used in OGNL expressions as they may present a security risk Review Comment: I think it's best we push developers to use `struts.disallowProxyObjectAccess` rather than `struts.disallowProxyMemberAccess` Issue Time Tracking ------------------- Worklog Id: (was: 914381) Time Spent: 2h 10m (was: 2h) > Extend SecurityMemberAccess proxy detection to Hibernate proxies > ---------------------------------------------------------------- > > Key: WW-5407 > URL: https://issues.apache.org/jira/browse/WW-5407 > Project: Struts 2 > Issue Type: Improvement > Components: Core > Reporter: Kusal Kithul-Godage > Priority: Minor > Fix For: 6.5.0 > > Time Spent: 2h 10m > Remaining Estimate: 0h > > The current option {{struts.disallowProxyMemberAccess}} does not have any > logic to detect Hibernate proxies which may also present a security risk. > Additionally, the current option only forbids access to members which > originate from a proxy. However, it makes more sense to forbid access to > proxy objects entirely. This is because proxying is often used for sensitive > instances, application beans or Hibernate objects. None of which is safe to > be accessed or manipulated via OGNL. Thus, let's introduce an additional > option {{struts.disallowProxyObjectAccess}} which will offer stronger > protection. > Finally, the caching mechanism in the ProxyUtil class uses an unbounded map, > this can potentially be attacked and lead to a memory leak or DoS. Let's > replace it with a Caffeine cache as we have done previously for the OGNL > expression cache. -- This message was sent by Atlassian Jira (v8.20.10#820010)