Application Servers: Tomcat, Node.js and Python
The recurring mistakes when Java, JavaScript and Python applications go to production: exposed app ports, debuggers, development servers, default credentials and unsupported runtimes.
OpenVAPT Academy handout. Online, with the self-check quiz: https://openvapt.com/academy/p13.html. Offline: openvapt learn P13.
Read First: P6
You Will Be Able To
- Explain why application servers belong behind a reverse proxy, bound to loopback.
- Recognise debuggers and development servers that give remote code execution.
- Harden the Tomcat Manager, AJP connector and shutdown port, and Django's production settings.
Behind the Proxy
Tomcat (8080), Node.js (3000), Gunicorn or Django (8000) and PHP-FPM (9000) are meant to sit behind nginx or Apache. The proxy terminates TLS, adds security headers and absorbs slow clients. Binding them to 127.0.0.1 keeps those protections in front of every request. Some default ports are worse than unprotected websites. The Node.js inspector (9229), Tomcat AJP (8009), PHP-FPM FastCGI and Jupyter (8888) can all hand out code execution to whoever connects.
Debuggers and Development Servers
node --inspect opens the V8 debugger with no authentication. The Flask and Werkzeug debugger runs Python typed into an error page. Django with DEBUG = True prints source, settings and SQL on every error. manage.py runserver, flask run and python -m http.server are documented as not for production. In a systemd service, all of these show up in ExecStart= and Environment=, which is where OpenVAPT looks.
Tomcat
The Manager application deploys WAR files, so it is code execution behind a password. Limit it to localhost with a RemoteAddrValve or remove it. Never keep default users such as tomcat/s3cret in tomcat-users.xml. AJP is a trusted protocol with no user authentication. Ghostcat (CVE-2020-1938) read files through any reachable AJP port. Disable the connector, or bind it to loopback with a secret. Disable the shutdown port (port="-1") and delete the examples and docs applications.
Runtimes Age Out
Node.js release lines reach end of life on a published schedule; after that there are no security releases. Prefer even-numbered LTS lines and plan upgrades before the date, the same way as for the operating system and PHP.
In Summary
Application servers belong behind a reverse proxy on loopback. Remove default apps and credentials. Turn off debug mode and keep the runtime supported.
Apply It
These OpenVAPT checks put this module into practice. Open one to see its detection logic and source code.
| Check | Title | Severity |
|---|---|---|
NET-APP-001 | Debugger or Application Control Ports Exposed | High |
NET-APP-002 | Application Server Ports Reachable Without a Reverse Proxy | Medium |
WEB-NODE-001 | Node.js Version Past End of Life | High |
WEB-NODE-002 | Node.js Debugger (Inspector) Enabled in a Service | Critical |
WEB-NODE-003 | Node.js Service Not Running in Production Mode | Low |
WEB-PY-001 | Django Debug Mode Enabled | High |
WEB-PY-002 | Django Accepts Any Host Header | Medium |
WEB-PY-003 | Django Uses the Generated Development Secret Key | High |
WEB-PY-004 | Python Interactive Debugger Enabled in a Service | Critical |
WEB-PY-005 | Python Development Server Used in a Service | Medium |
WEB-TOM-001 | Tomcat Manager Reachable Without Address Restriction | High |
WEB-TOM-002 | Tomcat Administrative Users With Default or Weak Passwords | Critical |
WEB-TOM-003 | Tomcat Shutdown Port Uses the Default Command | Medium |
WEB-TOM-004 | Tomcat AJP Connector Unprotected (Ghostcat) | Critical |
WEB-TOM-005 | Tomcat Example and Documentation Applications Deployed | Medium |
Printable Worksheet · Teacher Answer Key · For Teachers · Print this page with your browser's Print command for a handout.
Also available as plain Markdown for notes, scripts and AI tools. Same facts, same source, no styling.
Lab
Run: openvapt demo --only NET-APP-,WEB-TOM-,WEB-NODE-,WEB-PY- --out p13For each vulnerable service in internal/lab/fixtures_stacks.go, write the corrected ExecStart= and Environment= lines.Read the Tomcat server.xml in both labs and explain what each of the three changes prevents.
Check Yourself
Answers are checked in your browser and never stored or sent.
References
- Apache Tomcat, Security Considerations
- Django, Deployment checklist
- OWASP Node.js Security Cheat Sheet
Adapted from the OpenVAPT Academy (openvapt.com), built by AI Cybersecurity Engineers, used under the OpenVAPT Source-Available Licence 1.3. Free teaching use under Teaching With OpenVAPT. Pre-release material may be wrong or unstable; use at your own risk.
Cite This Page
If this page helped your work, please cite it. The version and web address are filled in; the access date is today's date in your browser. Every other style, and when credit is required, is on How to Cite OpenVAPT.
OpenVAPT. (2026). P13: Application Servers: Tomcat, Node.js and Python (Version 0.1.0-alpha.6). OpenVAPT Academy. Retrieved October 16, 2026, from https://openvapt.com/academy/p13.html
In text: (OpenVAPT, 2026). Accessed: the date shown is today's date from your own browser (the site's build date without JavaScript); change it to the day you read the page.
@misc{openvapt_p13,
author = {{OpenVAPT}},
title = {{P13: Application Servers: Tomcat, Node.js and Python}},
year = {2026},
howpublished = {\url{https://openvapt.com/academy/p13.html}},
note = {OpenVAPT Academy, version 0.1.0-alpha.6. Accessed 16 October 2026}
}
Accessed: the date shown is today's date from your own browser (the site's build date without JavaScript); change it to the day you read the page.
Citing OpenVAPT does not mean OpenVAPT endorses, approves or has reviewed your work.