Skip to content

fix: reject dangerous module ids in run_action - #228

Merged
matsuzaka-yuki merged 1 commit into
LyraVoid:mainfrom
can-xin:fix/reject-run-action-id
Oct 6, 2026
Merged

matsuzaka-yuki merged 1 commit into
LyraVoid:mainfrom
can-xin:fix/reject-run-action-id

Conversation

@can-xin

@can-xin can-xin commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

run_action concatenates the module id into /data/adb/modules/{id}/action.sh with no validation. .. in the id is resolved, so the action script can sit outside the module directory and is executed as root. A local app can use this to escalate to root. For example:

am start -n me.yuki.folk/me.bmax.apatch.ui.MainActivity \
  --ez from_action_shortcut true \
  --es apm_action_module_id '../../../data/local/tmp/poc'  # adb shell test command; the path can also point at an app's private directory

Reject ids that do not match the same pattern already used at zip install.

run_action concatenated the id into the action.sh path with no check, so .. was resolved and the script ran as root. Use the same id pattern as zip install.
@matsuzaka-yuki
matsuzaka-yuki merged commit 2aeabd0 into LyraVoid:main Oct 6, 2026
6 of 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.

2 participants