NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
☕
☕ Maven
Not in CISA KEV
LOW severity

JADX file override vulnerabilityGHSA-hvp5-5x4f-33fq

LOWFix: skylot/jadx@d86449a

GHSA-hvp5-5x4f-33fq is a low-severity (CVSS 3.3) vulnerability in io.github.skylot:jadx-core. A fix is available for io.github.skylot:jadx-core — see the affected versions and patch details below.

Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Dec 5, 2024 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
☕io.github.skylot:jadx-core

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

Description

Summary

when jadx parses a resource file, there is an escape problem with the style file, which can overwrite other files in the directory when saving the decompile result.

Although I don't think this vulnerability realizes path traversal in the true sense of the word , I reported it anyway

Details

I see that getResAlias does something with the filename.

private String getResAlias(int resRef, String origKeyName, @Nullable FieldNode constField) {

but type style will return the original filename directly.

img so our goal is to take a malicious file that was originally of type raw, modify its type to style, trick jadx into

step1

create an android project using androidstudio and create a raw folder with the name attack_file_sayhiiiiiiiiiiiii, it doesn't matter what the content is!

img generate an initial APK

step2

extract this initial APK using ZIP software to get resources.arsc

img drop resources.arsc into 010editor

step3

search for the previous filename attack_file_sayhiiiiiiiiiiiii , two will appear here, we choose the second one

img let's change the name of the file here. I'll change it to ../../_file_sayhiiiiiiiiiiiii

note that you can only overwrite files in the folder where the decompile was saved.

img

step4

change the type of this file to style

img modified to 0E

img

step5

After saving, re-compress the whole folder into a zip, then change the extension to APK.

open it with JADX and you can see that it has been changed to a style type.

img click save all

img you can see the file escaping.

img so we can also construct a

img so the classes.dex file is also replaced here

img

PoC

the details above have been written

Impact

latest version

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
☕Mavenio.github.skylot:jadx-coreall versions1.5.0io.github.skylot:jadx-core:1.5.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for io.github.skylot:jadx-core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update io.github.skylot:jadx-core to 1.5.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hvp5-5x4f-33fq is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Frequently Asked Questions

### Summary when jadx parses a resource file, there is an escape problem with the style file, which can overwrite other files in the directory when saving the decompile result. Although I don't think this vulnerability realizes path traversal in the true sense of the word , I reported it anyway ### Details I see that getResAlias does something with the filename. ```java private String getResAlias(int resRef, String origKeyName, @Nullable FieldNode constField) { ``` but type style will return the original filename directly. ![img](https://quan9i.oss-cn-beijing.aliyuncs.com/img/20240123221
O3 Security · Impact-Aware SCA

Is GHSA-hvp5-5x4f-33fq in your dependencies?

Find it across Maven, including transitive dependencies.

JADX file override vulnerability (Low 3.3)