Skip to content

Mitigate Velocity SSTI by enabling SecureUberspector and restricting …#723

Merged
kevinleturc merged 1 commit into
opensagres:masterfrom
AT190510-Cuong:fix-ssti-v2
Mar 23, 2026
Merged

Mitigate Velocity SSTI by enabling SecureUberspector and restricting …#723
kevinleturc merged 1 commit into
opensagres:masterfrom
AT190510-Cuong:fix-ssti-v2

Conversation

@AT190510-Cuong
Copy link
Copy Markdown
Contributor

@AT190510-Cuong AT190510-Cuong commented Mar 8, 2026

This patch mitigates a Server-Side Template Injection (SSTI) risk in the
Velocity template engine configuration.

The change enables SecureUberspector and restricts access to sensitive
Java classes and reflection-related packages that could be abused to
reach Runtime execution through template expressions.

This approach aligns with the security hardening already applied to
FreeMarker templates in the project.

@AT190510-Cuong
Copy link
Copy Markdown
Contributor Author

Hi @kevinleturc ,

Angelo mentioned that you might be able to review this PR if you have time.

This PR addresses a potential SSTI issue in the Velocity template engine used by XDocReport and introduces additional protections (SecureUberspector configuration and class access restrictions).

I would really appreciate it if you could take a look when convenient.

Thank you!

@kevinleturc
Copy link
Copy Markdown
Collaborator

Hello @AT190510-Cuong, yes sure I will have a look as soon as possible.
Do you have reported this as a CVE to public databases?
Thanks for your contribution.

@AT190510-Cuong
Copy link
Copy Markdown
Contributor Author

Hi @kevinleturc ,

Thanks for your response.

I did report this issue to MITRE. However, they marked it as a duplicate of CVE-2025-64087, which is associated with FreeMarker.

In my opinion, this issue also affects the Velocity template engine used in XDocReport, but it is not currently tracked as a separate CVE for Velocity.

The root cause is similar (server-side template injection), but the exploitation and mitigations are specific to Velocity (e.g., SecureUberspector and class access restrictions).

So at the moment, there is no dedicated CVE covering the Velocity side of this issue.

Please let me know if you think this should be tracked separately.

Thanks!

Copy link
Copy Markdown
Collaborator

@kevinleturc kevinleturc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me, I will fixup the commits and merge.

@kevinleturc kevinleturc merged commit e7a7431 into opensagres:master Mar 23, 2026
3 checks passed
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.

2 participants