You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Tamás Hanicz (Jira)" <ji...@apache.org> on 2026/08/17 10:14:00 UTC
[jira] [Resolved] (KNOX-3418) Path traversal → arbitrary file write/overwrite in the Apache Knox Admin API
[ https://issues.apache.org/jira/browse/KNOX-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamás Hanicz resolved KNOX-3418.
--------------------------------
Fix Version/s: 2.1.1
(was: 3.1.0)
Resolution: Fixed
> Path traversal → arbitrary file write/overwrite in the Apache Knox Admin API
> ----------------------------------------------------------------------------
>
> Key: KNOX-3418
> URL: https://issues.apache.org/jira/browse/KNOX-3418
> Project: Apache Knox
> Issue Type: Bug
> Components: Server
> Affects Versions: 2.1.0, 3.0.0
> Reporter: Tamás Hanicz
> Assignee: Tamás Hanicz
> Priority: Blocker
> Fix For: 3.0.0, 2.1.1
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Reported by greybtw
>
> Path traversal in the Knox Admin API resource-management endpoints (PUT /admin/api/v1/\{providerconfig,descriptors,topologies}/\{name}). The client-supplied resource name is URL-decoded and validated against RESOURCE_NAME_PATTERN = ^[\w-/.]+$, whose character class admits / and . (the - is literal), so a ../ traversal passes validation. The decoded name is then written via new File(dest, name) + FileUtils.writeStringToFile with no canonical-path containment check, so an authenticated admin-role user can write/overwrite a file outside the managed shared-providers/descriptors/topologies directories, with an attacker-chosen filename and extension (getFileNameForResource keeps the name verbatim when it already has a .)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)