Exploit databaseDownload repository ZIP
GH-df2de7b2e3f9afc9c88615734dfdf414
shivabalaj/cve-2026-114938
Sources for CVE-2026-114938
42 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files3
shivabalaj/cve-2026-114938Revision d01c63b87ad2
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
CVE-2026-114938.py
Python · 4,063 bytes counts[install.status] = counts.get(install.status, 0) + 1
print(Style.paint(f"[{index}] {label}", Style.BOLD + color))
print(f" Executable : {install.path}")
print(f" Version : {install.version_raw}")
print(f" Vendor : {install.vendor_hint or 'Unknown vendor'}")
print(f" Assessment : {install.reason}")
if install.return_code is not None:
print(f" Exit code : {install.return_code}")
print()
print("-" * max(60, len(title)))
print(
"Summary: "
f"{counts['VULNERABLE']} potentially vulnerable | "
f"{counts['REVIEW']} review | "
f"{counts['UNKNOWN']} unknown | "
f"{counts['SAFE']} safe by configured rule"
)
if counts["VULNERABLE"]:
print(Style.paint(
"Action: verify affected builds with the vendor and apply the "
"vendor-supported security update.",
Style.RED,
))
return 1
if counts["REVIEW"] or counts["UNKNOWN"]:
print(Style.paint(
"Action: review unresolved installations against official "
"vendor advisories. Do not interpret REVIEW as SAFE.",
Style.YELLOW,
))
return 0
# ---------------------------------------------------------------------------
# CLI
# ---------------------------------------------------------------------------
def build_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
description=(
"Inventory local Java runtimes and assess versions using a "
"provisional CVE-2026-114938 policy. Detection only."
),
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
epilog=(
"Examples:\n"
" %(prog)s\n"
" %(prog)s --json\n"
" %(prog)s --paths /opt/jdk /usr/lib/jvm/java-17/bin/java\n"
),
)
parser.add_argument(
"--paths",
nargs="+",
metavar="PATH",
help="Additional Java executable paths or JDK directories to inspect.",
)
parser.add_argument(
"--json",
action="store_true",
help="Print machine-readable JSON instead of the formatted report.",
)
parser.add_argument(
"--timeout",
type=float,
default=8.0,
help="Maximum seconds to wait for each Java executable.",
)
parser.add_argument(
"--fixed-17",
default=DEFAULT_FIXED_17,
help="Provisional fixed-build threshold for the Java 17 line.",
)
parser.add_argument(
"--vulnerable-start-17",
default=DEFAULT_VULNERABLE_START_17,
help="Provisional start of the reported Java 17 affected range.",
)
return parser
def main(argv: Sequence[str] | None = None) -> int:
parser = build_parser()
args = parser.parse_args(argv)
if args.timeout <= 0:
parser.error("--timeout must be greater than zero.")
start = normalize_version(args.vulnerable_start_17)
fixed = normalize_version(args.fixed_17)
if not start or not fixed or compare_versions(start, fixed) >= 0:
parser.error(
"--vulnerable-start-17 must be a valid version lower than --fixed-17."
)
try:
binaries = find_java_binaries(args.paths)
installs = [
probe_java(
binary,
vulnerable_start_17=args.vulnerable_start_17,
fixed_17=args.fixed_17,
timeout=args.timeout,
)
for binary in binaries
]
if args.json:
print_json_report(installs)
return 1 if any(item.status == "VULNERABLE" for item in installs) else 0
return print_text_report(installs)
except KeyboardInterrupt:
print("\nInterrupted by user.", file=sys.stderr)
return 2
except (OSError, ValueError) as error:
print(f"Error: {error}", file=sys.stderr)
return 2
if __name__ == "__main__":
raise SystemExit(main())