Skip to content

Solution (#9771): [安全]JimuReport使用的FreeMarker的沙箱可被绕过造成远程代码执行 - #9772

Open
TFGSUMIT wants to merge 2 commits into
jeecgboot:mainfrom
TFGSUMIT:fix/issue-9771
Open

Solution (#9771): [安全]JimuReport使用的FreeMarker的沙箱可被绕过造成远程代码执行#9772
TFGSUMIT wants to merge 2 commits into
jeecgboot:mainfrom
TFGSUMIT:fix/issue-9771

Conversation

@TFGSUMIT

Copy link
Copy Markdown

This pull request addresses the Security-Related Issue (SSTI) vulnerability in the JimuReport module of the JeecgBoot project. The vulnerability allowed for remote code execution by bypassing the FreeMarker sandbox.

Changes:

  • Introduced a new SafeFreemarkerMethod class that safely computes FreeMarker expressions.
  • Updated FreeMarkerUtils to use this new method.
  • Added unit tests to ensure correctness.

Testing instructions:

  • Run the FreeMarkerUtilsTest class to verify that the fix works as expected.
  • Test the JimuReport module with various inputs to ensure that the fix prevents remote code execution.

Note: This fix requires a thorough review of the code to ensure that all FreeMarker expressions are properly sanitized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant