Skip to content
KitploitKITPLOIT
ToolsBlog
Log in
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2018-1305 — Apache Tomcat 安全绕过漏洞 Poc | Kitploit
Tools/GitHubGitHub/pa55w0rd/cve-2018-1305
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration Testing
GitHubpa55w0rd/cve-2018-1305

CVE-2018-1305

Apache Tomcat 安全绕过漏洞 Poc

View Repository
69168 years agoNot yet reviewed
Share

Apache Tomcat Security Bypass Vulnerability

exploit

Recently, Apache released a security advisory stating that multiple versions of Apache Tomcat 7, 8, and 9 have a security bypass vulnerability. Attackers can exploit this issue to bypass certain security restrictions to perform unauthorized operations, which may aid further attacks.

Security constraints defined by Apache Tomcat servlet annotations are applied only once after the servlet is loaded. Because constraints defined in this way apply to the URL pattern and any URLs under that point, it likely depends on the order of servlet loading, which may expose resources to users without authorization to access them.

Vulnerability ID

CVE-2018-1305

Affected Versions

Apache Tomcat < 9.0.5

Apache Tomcat < 8.5.28

Apache Tomcat < 8.0.50

Apache Tomcat < 7.0.85

Severity

Medium

Vulnerability Reproduction

Java EE provides the ServletSecurity annotation similar to ACL permission checks, which can be used to decorate Servlets for protection. If there are two servlets, Servlet1 with access path "/servlet1/" and added ServletSecurity annotation, and Servlet2 with access path "/servlet1/servlet2/" but without ServletSecurity annotation, when first accessing servlet1/servlet2, the ServletSecurity annotation of servlet1 will not take effect and cannot protect the "/servlet1/servlet2" path, thus may lead to unauthorized access.

If "/servlet1" is accessed before "/servlet1/servlet2", Tomcat will load the ACL and start protecting "/servlet1/servlet2", so the vulnerability will not be triggered.

exploit

Add ServletSecurity annotation to Servlet1, Servlet2 has no such annotation.

exploit

Modify the url-pattern corresponding to the servlet in the web.xml file as shown in the image below.

exploit

Run the project. When first accessing the URL of servlet2, it is found that unauthorized access is possible, the ACL for servlet1 has not taken effect.

http://localhost:8080/CVE-2018-1305/servlet1/servlet2/

exploit

When accessing the URL of servlet1 the second time, access is denied, and the ACL takes effect.

http://localhost:8080/CVE-2018-1305/servlet1/

exploit

Access the URL of servlet2 again, and find that access is denied. For the ACL to take effect on servlet2, it must be based on the premise that servlet1 has been accessed.

http://localhost:8080/CVE-2018-1305/servlet1/servlet2/

exploit

Vulnerability Demonstration

exploit

Therefore, the reproduction of the vulnerability is limited to the condition that after Tomcat starts, the "/servlet1/servlet2/" page is accessed before accessing "/servlet1/". If anyone had previously accessed the "/servlet1/*" page, the vulnerability would not be triggered. The vulnerability is highly harmful, but the exploitation conditions are difficult, so the scope of impact is not large.

Related Links

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1305

http://blog.nsfocus.net/cve-2018-130-handling/

https://www.anquanke.com/post/id/99213

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    513
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    471
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    345
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    311
  • 5

    estorides

    grisuno/estorides

    Aggregates 99+ free OSINT sources in parallel, resolves entities into a knowledge graph, and exports STIX 2.1, MISP, or GraphML with LLM-assisted analysis.

    303
  • 6

    opencti

    opencti-platform/opencti

    Open Cyber Threat Intelligence Platform

    303

Explore all tools

Browse our collection of tools

View all tools →