Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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
Tools/GitHubGitHub/paparojonathan/cve-2026-9335-keras-hdf5-externallink
Vulnerability AnalysisExploitationPapers & ResearchLearning & EducationCurated Resources
GitHubpaparojonathan/cve-2026-9335-keras-hdf5-externallink

CVE-2026-9335-keras-hdf5-externallink

CVE-2026-9335: KerasFileEditor and load_weights follow h5py ExternalLinks, disclosing arbitrary local HDF5 file contents in keras ≤ 3.14.0. Advisory + verified PoCs.

View Repository
332 months agoNot yet reviewed
Share

CVE-2026-9335 — Keras HDF5 ExternalLink local file-content disclosure

CVE CVSS CWE-22 Affected Fixed

Two public Keras APIs — keras.saving.KerasFileEditor and keras.saving.load_weights / model.load_weights — read HDF5 group members by direct indexing without a link-type check. h5py auto-dereferences ExternalLink / SoftLink on indexing, so an attacker-supplied .weights.h5, .h5, or .keras file containing only a link causes Keras to read the contents of arbitrary HDF5 files on the victim's local filesystem.

Keras already ships the correct guard (safe_get_h5_group / safe_get_h5_dataset in saving_lib.py) — these two entry points simply don't call it.

At a glance

CVECVE-2026-9335
Affectedkeras-team/keras ≤ 3.14.0 (PyPI)
TypePath Traversal / Information Exposure (CWE-22, CWE-200)
CVSS 3.1AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N → 6.5 (Medium)
ImpactDisclosure of any local HDF5 file the victim can read
VectorVictim opens/loads a malicious .weights.h5 / .h5 / .keras file
StatusFixed in keras 3.15.0 (PR #22899 / #22900); validated on huntr (2026-05-22, maintainer hertschuh)
ReporterJonathan Paparo (jonathan-paparo)

Repository contents

PathWhat it is
advisory/CVE-2026-9335.mdFull technical write-up: root cause, both sites, PoC output, fix
poc/poc_file_editor.pyPoC 1 — KerasFileEditor follows an ExternalLink and leaks a victim h5
poc/poc_load_weights.pyPoC 2 — model.load_weights pulls a victim's weights via ExternalLink
poc/requirements.txtPinned reproduction environment
docs/timeline.mdCoordinated-disclosure timeline

Root cause (30 seconds)

# keras/src/saving/saving_api.py  (load_weights, legacy .h5 branch)
with h5py.File(filepath, "r") as f:
    if "layer_names" not in f.attrs and "model_weights" in f:
        f = f["model_weights"]      # <-- ExternalLink here is auto-dereferenced by h5py

f["model_weights"] (and the analogous data[key] walk in file_editor.py) transparently follows a link into another file. The safe pattern that Keras uses elsewhere pre-checks the link type first:

# keras/src/saving/saving_lib.py  (safe_get_h5_group)
group_type = parent.get(name, default=None, getclass=True, getlink=True)
if group_type in (h5py.ExternalLink, h5py.SoftLink):
    raise ValueError(f"Not allowed: H5 file with {group_type.__name__}")

Reproduce

python -m pip install -r poc/requirements.txt

# PoC 1 — KerasFileEditor leaks a separate victim h5 file's contents
KERAS_BACKEND=jax python poc/poc_file_editor.py

# PoC 2 — model.load_weights loads a victim file's weights via an ExternalLink
KERAS_BACKEND=jax python poc/poc_load_weights.py

Each PoC creates its own throwaway "victim" and "attacker" h5 files under the system temp directory, demonstrates the leak, prints *** VULNERABILITY CONFIRMED ***, and cleans up after itself. Verified on keras==3.14.0, Python 3.12.6, JAX backend.

Fix

Route both sites through the existing safe_get_h5_group helper, or add a data.get(key, default=None, getclass=True, getlink=True) pre-check that rejects (h5py.ExternalLink, h5py.SoftLink) before indexing. See the advisory for exact diffs.

Responsible use

This material is published for defensive and educational purposes after coordinated disclosure and CVE assignment. The PoCs operate only on files they create themselves in a temp directory. Do not use these techniques against systems or data you are not authorized to test.

Credit

Discovered and reported by Jonathan Paparo (huntr: jonathan-paparo). Validated by keras-team maintainer hertschuh.

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.

    871
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    548
  • 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.

    383
  • 4

    redforge

    cybersecurity91/redforge

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

    361
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    305
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    280

Explore all tools

Browse our collection of tools

View all tools →