Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files and Resources V12 - Sanity Check Comments/Suggestions for v.5.0 #2593

Open
csfreak92 opened this issue Feb 10, 2025 · 2 comments
Open
Labels
1) Discussion ongoing Issue is opened and assigned but no clear proposal yet V12 _5.0 - prep This needs to be addressed to prepare 5.0

Comments

@csfreak92
Copy link
Collaborator

Chapter V12 - Files and Resources

Here are a few things I observed reviewing this chapter for v.5.0 for sanity check related to #2582:

Question 1: In requirement, 12.3.1 [MODIFIED, MERGED FROM 12.3.2, 12.3.3, 5.3.9] Verify that file operations avoid using user-submitted filenames or file metadata when creating file paths to protect against path traversal, local or remote file inclusion (LFI, RFI), and server-side request forgery (SSRF) attacks. Instead, use internal, trusted data for file I/O. If user-submitted filenames or file metadata must be used, strict validation and sanitization must be applied.,

What do we mean by "use internal, trusted data for file I/O."? Is this referring to the data inside the file, thus not pertaining to metadata? Or internal, trusted data in the application that means it will just ignore anything coming from the files, but what about file name and others? I guess maybe it wasn't clear as to what it was referring to and it might be confusing the way I read it.

@elarlang
Copy link
Collaborator

#1427

@jmanico
Copy link
Member

jmanico commented Feb 10, 2025

What do we mean by "use internal, trusted data for file I/O."? Is this referring to the data inside the file, thus not pertaining to metadata?

This is like a static variable that an attacker cannot modify, as opposed to user input.

@tghosth tghosth added 1) Discussion ongoing Issue is opened and assigned but no clear proposal yet _5.0 - prep This needs to be addressed to prepare 5.0 V12 labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1) Discussion ongoing Issue is opened and assigned but no clear proposal yet V12 _5.0 - prep This needs to be addressed to prepare 5.0
Projects
None yet
Development

No branches or pull requests

4 participants