Skip to content

Fixed: isExecutable() missed Tika's ELF sub-types, letting real Linux binaries through the check (OFBIZ-13486) - #1600

Merged
mridulpathak merged 1 commit into
apache:trunkfrom
mridulpathak:elf-mime-type-detection
Aug 7, 2026
Merged

Fixed: isExecutable() missed Tika's ELF sub-types, letting real Linux binaries through the check (OFBIZ-13486)#1600
mridulpathak merged 1 commit into
apache:trunkfrom
mridulpathak:elf-mime-type-detection

Conversation

@mridulpathak

Copy link
Copy Markdown
Contributor

SecuredUpload.isExecutable() only matched the generic mimeType application/x-elf, but Tika (verified against tika-core:3.3.1) classifies real ELF binaries into more specific sub-types instead — application/x-executable, application/x-sharedlib, application/x-object, application/x-coredump — so actual executables and shared libraries passed the check undetected. Confirmed with two real ELF files (a JNA native .so and a JDK's bin/java PIE executable), both detected as application/x-sharedlib and missed by the old check. Adds the four sub-types to the check.

… binaries through the check (OFBIZ-13486)

SecuredUpload.isExecutable() only matched the generic mimeType "application/x-elf", but Tika (verified against tika-core:3.3.1) classifies real ELF binaries into more specific sub-types instead -- "application/x-executable", "application/x-sharedlib", "application/x-object", "application/x-coredump" -- so actual executables and shared libraries passed the check undetected. Adds the four sub-types to the check.
@mridulpathak
mridulpathak merged commit 37345ed into apache:trunk Aug 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant