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

Vulnerability CWE-113 api/api.go:140 #4209

Open
omordyk opened this issue Dec 16, 2024 · 0 comments · May be fixed by #4210
Open

Vulnerability CWE-113 api/api.go:140 #4209

omordyk opened this issue Dec 16, 2024 · 0 comments · May be fixed by #4210
Assignees
Labels

Comments

@omordyk
Copy link

omordyk commented Dec 16, 2024

Vulnerability CWE-113 api/api.go:140
http://cwe.mitre.org/data/definitions/113.html
Pr :#4210

Description:
Software places user-controlled input in HTTP headers. An attacker could inject line separators (CR/LF sequences) that could split the response message generated by the software into two messages. The second response is completely under the control of the attacker (intermediate web proxies may cache it), with could produce multiple conditions (web defacement, cache poisoning, cross-site scripting or page hijacking, see CWE-113 for full details). If software needs to generate HTTP headers depending on user-controlled input, such input should be properly neutralized (a white-list validation excluding CR/LF is recommended). Please note that cookies are received and sent in 'Cookie' header in HTTP messages, so if the software generates a Cookie from user input, the input should be properly validated as well.

api/api.go:140
w.Header().Add("Access-Control-Allow-Origin", r.Header.Get("Origin"))

@omordyk omordyk self-assigned this Dec 16, 2024
omordyk added a commit that referenced this issue Dec 16, 2024
Signed-off-by: Oleksandr Mordyk <oleksandr.mordyk1994@outlook.com>
@omordyk omordyk linked a pull request Dec 16, 2024 that will close this issue
12 tasks
@omordyk omordyk linked a pull request Dec 16, 2024 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant