Nettacker icon indicating copy to clipboard operation
Nettacker copied to clipboard

Improve Apache Struts S2-045 (CVE-2017-5638) detection module correctness and naming

Open Gauravsharma2040 opened this issue 9 months ago • 3 comments

Identified Issues

Incorrect HTTP method The module currently uses GET for detection, while CVE-2017-5638 (S2-045) exploitation occurs via OGNL injection in the Content-Type header, which requires a POST request. Using GET may lead to false negatives in environments where the vulnerability is only triggered through request body parsing.

Non-standard module naming The module name does not follow Nettacker’s product_cve_YYYY_NNNN convention used across other vulnerability modules.

Detection determinism Detection logic can be improved by verifying controlled response header injection, ensuring deterministic validation rather than relying on indirect behavior. Proposed Improvements Rename the module to apache_struts_cve_2017_5638 to align with existing CVE-based module naming standards. Update the detection request to use POST with controlled OGNL header injection via the Content-Type header. Implement deterministic response validation to reduce potential false positives. Ensure compatibility with Nettacker’s template formatting system.

Validation Plan The updated implementation will be validated against: A vulnerable Struts2 S2-045 test container. A non-vulnerable Tomcat instance to confirm absence of false positives.

Gauravsharma2040 avatar Feb 24 '26 16:02 Gauravsharma2040

Hi @Gauravsharma2040 , there is already an issue on this #1170 which was assigned to another contributor

Aarush289 avatar Feb 24 '26 16:02 Aarush289

Thanks for pointing that out I didn’t notice #1170 was already open and assigned. Since there hasn’t been an update in a while, I’m happy to help if the assignee is no longer working on it , but I’ll defer to the maintainers on how to proceed.

Gauravsharma2040 avatar Feb 24 '26 19:02 Gauravsharma2040

Closing this as it duplicates #1170.

I came across the issue while testing locally and implemented a fix before realizing it was already reported and assigned. I’ve linked my PR to the original issue instead in case it’s helpful.

Gauravsharma2040 avatar Feb 24 '26 19:02 Gauravsharma2040