Skip to content

templated/cve-2025-24813 - #287

Open
dyeddala wants to merge 1 commit into
google:mainfrom
dyeddala:feature/cve-2025-24813
Open

dyeddala wants to merge 1 commit into
google:mainfrom
dyeddala:feature/cve-2025-24813

Conversation

@dyeddala

@dyeddala dyeddala commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Please review.

@robert-doyensec

Copy link
Copy Markdown
Contributor

Hi @dyeddala , it looks like you forgot to include the ./vulnerable and ./patched folders in the commit, the docker compose file can't build anything

@dyeddala
dyeddala force-pushed the feature/cve-2025-24813 branch from 0735e6a to 0c41cc2 Compare November 13, 2026 00:17
@dyeddala

Copy link
Copy Markdown
Contributor Author

Addressed.As per the comments.

@@ -0,0 +1,20 @@
# --- Stage 1: Patched Instance (Tomcat 9.0.99) ---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like this file was included by mistake since it is in the patched and vulnerable folder as well

RUN cp -r /usr/local/tomcat/webapps.dist/* /usr/local/tomcat/webapps/

# Keep write access disabled (readonly=true) on DefaultServlet
RUN sed -i '/<servlet-class>org.apache.catalina.servlets.DefaultServlet<\/servlet-class>/a \ <init-param>\n <param-name>readonly</param-name>\n <param-value>true</param-value>\n </init-param>' /usr/local/tomcat/conf/web.xml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you keep the readonly false and file-based session persistence the same as in the vulnerable container? This way we can test and be certain that the patched versions will not be detected by the plugin, and that changing the version alone is enough to patch it.

docker compose up -d tomcat-patched
```

### Testing the vulnerability

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe this would only detect if partial PUT requests and default writeable servlet are enabled, which could be allowed in the patched version too.

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.

3 participants