# Untrusted executable, library, or module search path

A program resolves an executable/library/module from an attacker-writable search location instead of the intended trusted component.

**Candidate CWE:** [CWE-427](https://cwe.mitre.org/data/definitions/427.html)

## Test hypothesis

Trace basename-based execution, dynamic loading, and plugin discovery with their actual PATH/module search rules. In a local fixture, place a harmless marker component in an attacker-writable candidate directory and observe which file resolves. Compare an absolute trusted path or constrained search configuration.

## Evidence required

Search order, directory ownership, attacker capability, selected file path/hash, invoking process identity, and marker-only observation. Explain the privilege boundary or trusted action influenced by the substituted component.

## Rule out false positives

Attacker already controls the same process/code; the directory is not writable to the proposed actor; the component is explicitly user-selected under the product contract; or trusted resolution precedes it.

## Playbook and command references

- [Source review: entry point to protected operation](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/source-dataflow.html) — Trace attacker control and authorization through handlers, services, queues, and sensitive operations; promote only reachable violations of a stated invariant.
- [CI and releases: trace untrusted input into privileged work](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/supply-chain-ci.html) — Audit workflow events, shell interpolation, untrusted builds, artifact consumers, and release identity as one privilege chain.

[Find the associated command snippets](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=Source%20review%3A%20entry%20point%20to%20protected%20operation)

## Referenced by these target playbooks

[OSS & self-hosted](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/oss.html) · [Desktop & extensions](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/desktop.html) · [Cloud & containers](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/cloud.html) · [Hardware & firmware](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/hardware.html) · [AI, agents & MCP](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/ai.html)

## Report checklist

- [ ] Capture the affected version, configuration, identities, and object ownership.
- [ ] Preserve a valid baseline and a negative control.
- [ ] Reproduce the forbidden data access, action, or state change on controlled fixtures.
- [ ] Explain the intended security rule and why the observed behavior violates it.
- [ ] State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.

## Conditional ATT&CK mapping

- [T1068 · Exploitation for Privilege Escalation](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html#T1068) — **Only if:** A software vulnerability crosses a privilege boundary into a more privileged process or security context; record before/after identities and the vulnerable component. **Not established by:** Do not infer this from any feature named admin, a writable path alone, or a kernel version match. Application role authorization flaws need their own contextual analysis.

## Primary references

- [MITRE CWE-427](https://cwe.mitre.org/data/definitions/427.html)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
