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

New Published Rules - cosmosofcyberspace_github_io.web_cache_deception_nodejs_express_framework #3221

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require('express')
const app = express()
const port = 3000

app.get('/info/nuri.yavuz*', (req, res) => {
res.send('Company: Trendyol, Birth Date: 1997, Country: Turkey, Phone: 5554443322')
})

app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
rules:
- id: web_cache_deception_nodejs_express_framework
patterns:
- pattern-either:
- pattern: $Y.get($X, ...)
- pattern: $Y.post($X, ...)
- pattern: $Y.put($X, ...)
- pattern: $Y.delete($X, ...)
- pattern: $Y.patch($X, ...)
- pattern-inside: |
require('express')
...
- metavariable-pattern:
metavariable: $X
patterns:
- pattern-regex: \/[^'"]*[*]
message: Detected express path decorator with * character may lead to web cache
deception
severity: INFO
languages:
- js
- javascript
metadata:
category: security
subcategory:
- vuln
cwe:
- 'CWE 525: Use of Web Browser Cache Containing Sensitive Information'
confidence: MEDIUM
likelihood: MEDIUM
impact: HIGH
technology:
- express
- nodejs
source_rule_url: https://cosmosofcyberspace.github.io/semgrep/nodejs/express/express.html
references:
- https://cosmosofcyberspace.github.io/semgrep/nodejs/express/express.html
Loading