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

[JS]: Web Cache Deception #811

Closed
1 of 2 tasks
aydinnyunus opened this issue Dec 20, 2023 · 3 comments
Closed
1 of 2 tasks

[JS]: Web Cache Deception #811

aydinnyunus opened this issue Dec 20, 2023 · 3 comments
Labels
All For One Submissions to the All for One, One for All bounty

Comments

@aydinnyunus
Copy link

Query PR

github/codeql#15180

Language

Javascript

CVE(s) ID list

CWE

CWE-525: Use of Web Browser Cache Containing Sensitive Information

Report

I created a new CodeQL query to detect potential Web Cache Deception vulnerabilities in web applications. Web Cache Deception is a security vulnerability where attackers trick a server into caching sensitive information, which they can later access. This query aims to identify code patterns that might make an application susceptible to this type of attack.

Steps To Reproduce:

  • codeql database create wcd --language=javascript --source-root "ql/src/Security/CWE-525/"
  • In VSCode, Run the following query
/**
 * @name Web Cache Deception in Express
 * @description A caching system has been detected on the application and is vulnerable to web cache deception. By manipulating the URL it is possible to force the application to cache pages that are only accessible by an authenticated user. Once cached, these pages can be accessed by an unauthenticated user.
 * @kind problem
 * @problem.severity error
 * @security-severity 9
 * @precision medium
 * @id js/web-cache-deception-express
 * @tags javascript
 *       cwe-525
 *       bug
 */

import javascript
import WebCacheDeceptionLib

from WebCacheDeception::Sink httpHandleFuncCall
where httpHandleFuncCall.toString().matches("%*%")
select httpHandleFuncCall, httpHandleFuncCall + " is used as wildcard endpoint."


Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc).

  • Yes
  • No

Blog post link

No response

@aydinnyunus aydinnyunus added the All For One Submissions to the All for One, One for All bounty label Dec 20, 2023
@ghsecuritylab
Copy link
Collaborator

Your submission is now in status Final decision.

For information, the evaluation workflow is the following:
Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

@xcorail
Copy link
Contributor

xcorail commented Jan 8, 2024

Thanks for the submission!

Similarly to your other web cache deception submission, we have internally assessed the query and its findings, and we have determined these query additions and the web cache deception vulnerability class in general do not fulfill the criteria to be included into the CodeQL query suites. We don't deny that the vulnerabilities this query tries to cover can occur in reality. However, it might be hard to properly identify this vulnerability class with a query as it depends on other factors whether a finding is a vulnerability (e.g. the intention of the developers or in the case of an attack via CDN the configuration of the CDN itself.).

Therefore it's not eligible for a reward under the Bug Bounty program, as our goal is to scale vulnerability detection with a low false positive rate. For queries such as this please consider making a PR to the CodeQL-Community-Packs where we also accept queries for vulnerabilities that don't manifest themselves in code only.

Looking forward to your other submissions!

@xcorail xcorail closed this as completed Jan 8, 2024
@ghsecuritylab
Copy link
Collaborator

Your submission is now in status Closed.

For information, the evaluation workflow is the following:
Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
All For One Submissions to the All for One, One for All bounty
Projects
None yet
Development

No branches or pull requests

3 participants