Skip to content

Pensar automated pull request (F6Qn)#31

Open
pensarappdev[bot] wants to merge 1 commit into
mainfrom
pensar-auto-fix-DgiN
Open

Pensar automated pull request (F6Qn)#31
pensarappdev[bot] wants to merge 1 commit into
mainfrom
pensar-auto-fix-DgiN

Conversation

@pensarappdev
Copy link
Copy Markdown

@pensarappdev pensarappdev Bot commented Jun 12, 2025

Type Identifier Message Severity Link
Application
CWE-22
The value of embedding_path is taken directly from the function argument without any sanitisation or validation and is then passed to open() in write-mode. If an attacker can control this parameter, they could supply values such as ../../../../etc/cron.d/pwn or an absolute path like /tmp/evil.npy, allowing them to create or overwrite arbitrary files outside the intended directory. This constitutes a classic Path Traversal / Arbitrary File Write vulnerability (CWE-22). In combination with the earlier np.load(embedding_path) call (deserialisation), an attacker could first write a malicious file and subsequently load it to achieve code-execution. Because it can lead to filesystem compromise and potential privilege escalation, the severity is marked as High.
high
 Link 

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.

0 participants