{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2016-1240 exists.","fix":"Apply the vendor's patch.","what":"CVE-2016-1240 is a high-severity vulnerability in Apache Tomcat, published on 3 Oct 2016. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2016-1240 and fix it if it is affected.\n\nWhat it is: CVE-2016-1240 is a high-severity vulnerability in Apache Tomcat, published on 3 Oct 2016. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2016-1240 exists.\n\nAffected product: Apache Tomcat. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2016-1240/ (Markdown: https://insights.sbomify.com/CVE-2016-1240/index.md)","id":"CVE-2016-1240","markdown":"https://insights.sbomify.com/CVE-2016-1240/index.md","name":"CVE-2016-1240","record":{"aliases":["DLA-622-1","DLA-623-1","DSA-3669-1","DSA-3670-1","GHSA-8c5c-v572-37xf","UBUNTU-CVE-2016-1240","USN-3081-1","USN-3081-2"],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["privilege_escalation"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Tomcat server","requires_auth":"low_privilege","summary":"Local attackers with tomcat account access can gain root privileges via a symlink attack on the Catalina log file in Tomcat init scripts.","user_interaction":"not_required","vuln_class":"privilege_escalation"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"debian","cpe":[{"product":"tomcat","vendor":"apache"}],"cvss":{"score":7.8,"severity":"high","source":"nvd","vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"description":"The Tomcat init script in the tomcat7 package before 7.0.56-3+deb8u4 and tomcat8 package before 8.0.14-1+deb8u3 on Debian jessie and the tomcat6 and libtomcat6-java packages before 6.0.35-1ubuntu3.8 on Ubuntu 12.04 LTS, the tomcat7 and libtomcat7-java packages before 7.0.52-1ubuntu0.7 on Ubuntu 14.04 LTS, and tomcat8 and libtomcat8-java packages before 8.0.32-1ubuntu1.2 on Ubuntu 16.04 LTS allows local users with access to the tomcat account to gain root privileges via a symlink attack on the Catalina log file, as demonstrated by /var/log/tomcat7/catalina.out.","ecosystems":[],"exploits":{"exploitdb":1,"first_seen":"2016-09-30","github_poc":2,"max_poc_stars":1,"metasploit":1,"nuclei":0,"refs":[{"date":"2016-10-13T13:46:46Z","kind":"github_poc","ref":"https://github.com/Naramsim/Offensive","stars":1,"title":"Reproducible exploits for: CVE-2016-1240 CVE-2008-2938 CVE-2014-2064 CVE-2014-1904"},{"date":"2016-09-30","kind":"metasploit","ref":"exploit/linux/local/tomcat_ubuntu_log_init_priv_esc","stars":null,"title":"Apache Tomcat on Ubuntu Log Init Privilege Escalation"},{"date":"2016-10-03","kind":"exploitdb","ref":"40450","stars":null,"title":"Apache Tomcat 8/7/6 (Debian-Based Distros) - Local Privilege Escalation"},{"date":"2018-12-02T19:35:28Z","kind":"github_poc","ref":"https://github.com/mhe18/CVE_Project","stars":0,"title":"CVE-2016-1240 exploit and patch"}],"tier":"weaponised"},"has_fix":true,"headline":"Privilege escalation in n/a","id":"CVE-2016-1240","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"apache:tomcat","products":["apache:tomcat"],"type":"privilege_escalation","year":"2016"},"n_packages":0,"n_references":14,"next":{"headline":"Tryton allows users to read the hashed password","id":"CVE-2016-1241"},"packages":[],"prev":{"headline":"Code injection in duck","id":"CVE-2016-1239"},"products":["n/a"],"published":"2016-10-03","related":[{"cvss_score":10,"headline":"Apache Tomcat Path Equivalence","id":"CVE-2025-24813","kev_date_added":"2025-04-01","published":"2025-03-10"},{"cvss_score":9.8,"headline":"Apache Tomcat Remote Code Execution","id":"CVE-2016-8735","kev_date_added":"2023-05-12","published":"2017-04-06"},{"cvss_score":8.1,"headline":"Apache Tomcat Remote Code Execution","id":"CVE-2017-12617","kev_date_added":"2022-03-25","published":"2017-10-03"},{"cvss_score":8.1,"headline":"Apache Tomcat on Windows Remote Code Execution","id":"CVE-2017-12615","kev_date_added":"2022-03-25","published":"2017-09-19"},{"cvss_score":7.5,"headline":"Apache Tomcat Missing Encryption of Sensitive Data","id":"CVE-2026-34486","kev_date_added":"2026-08-04","published":"2026-04-09"},{"cvss_score":9.8,"headline":"Apache Tomcat: HTTP/2 no-authority bypass of strict SNI validation - CVE-2026-32990 fix incomplete","id":"CVE-2026-65637","kev_date_added":null,"published":"2026-08-25"},{"cvss_score":9.8,"headline":"Apache Tomcat: Limited replay attack possible with DIGEST authentication","id":"CVE-2026-65905","kev_date_added":null,"published":"2026-08-25"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-05","vendors":["n/a"]},"summary":"Local attackers with tomcat account access can gain root privileges via a symlink attack on the Catalina log file in Tomcat init scripts.","url":"https://insights.sbomify.com/CVE-2016-1240/"}