Repository navigation
fix(pre2k): fix directory traversal and arbitrary file write vulnerabilities (#1261) - #1334
Closed
Char0n1507 wants to merge 2 commits into
Closed
Char0n1507 wants to merge 2 commits into
Char0n1507 wants to merge 2 commits into
Conversation
Char0n1507
requested review from
Marshall-Hallenbeck,
NeffIsBack,
mpgn and
zblurx
as code owners
July 28, 2026 13:22
|
It looks like the PR template may not have been filled out. The following sections appear to be missing:
Please edit your PR description to include them. The template helps reviewers understand and test your changes. Thanks! |
Member
|
Hi and thanks for the PR, but I will close this one because it is duplicate to #1243. Regarding the samaccountname I'll either just implement a file jail so you can't stored data outside of the nxc folder or simply remove the samaccountname from the filename entirely. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the Directory Traversal and Arbitrary File Write vulnerabilities reported in #1261 within the
pre2kmodule.Changes made:
connection.domainto remove illegal path characters (such as../) to prevent directory traversal out of theNXC_PATH/modules/pre2kdirectory when writing output files.sAMAccountNameagainst Microsoft's documented restrictions, ensuring it does not contain illegal characters ("[]:;|=+*?<>/\\,). If an illegal character is found, it is skipped and logged to debug instead of being written, which prevents an attacker from injecting arbitrary file contents via a malicious LDAP server.Fixes #1261
Type of change
Checklist: