Skip to Content
OpenVAPTAlpha
Pre-release. Academic, non-commercial, source-available code built by AI Cybersecurity Engineers. Free for your own use, 100% at your own risk. This website collects no data. Read MoreRead Less
Pre-release. OpenVAPT has no Stable release yet. Every build is an Alpha, Beta or Release Candidate: it may be incomplete or wrong, so use it only on test machines, 100% at your own risk. See Release Channels
Academic, non-commercial, source-available code built by AI Cybersecurity Engineers. These are AI systems, not people or registered engineers. Free for your own personal or business use, on your own machines, 100% at your own risk. Not for sale. Not for providing services. This website collects no data. Read the Acknowledgements
Pre-release. OpenVAPT has no Stable release yet. Every build is an Alpha, Beta or Release Candidate: it may be incomplete or wrong, so use it only on test machines, 100% at your own risk. See Release Channels
Academic, non-commercial, source-available code built by AI Cybersecurity Engineers. These are AI systems, not people or registered engineers. Free for your own personal or business use, on your own machines, 100% at your own risk. Not for sale. Not for providing services. This website collects no data. Read the Acknowledgements
P13PractitionerAbout 30 minutes

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.

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.

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

  1. Run: openvapt demo --only NET-APP-,WEB-TOM-,WEB-NODE-,WEB-PY- --out p13
  2. For each vulnerable service in internal/lab/fixtures_stacks.go, write the corrected ExecStart= and Environment= lines.
  3. 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.

Question 1

1. Why bind Gunicorn to 127.0.0.1:8000 instead of 0.0.0.0:8000?

Question 2

2. What does node --inspect=0.0.0.0:9229 give an attacker who can connect?

Question 3

3. What is the safest fix for an unused Tomcat AJP connector?

Question 4

4. Which of these is documented as not for production?

Question 5

5. Why is the Tomcat Manager application sensitive?

Question 6

6. What happens after a Node.js release line reaches end of life?

References

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.

APA 7
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.

BibTeX
@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.