René's URL Explorer Experiment


Title: Java: CWE-073 File path injection with the JFinal framework by luchua-bc · Pull Request #7712 · github/codeql · GitHub

Open Graph Title: Java: CWE-073 File path injection with the JFinal framework by luchua-bc · Pull Request #7712 · github/codeql

X Title: Java: CWE-073 File path injection with the JFinal framework by luchua-bc · Pull Request #7712 · github/codeql

Description: External Control of File Name or Path, also called File Path Injection, is a common attack and injection attack is listed as one of the top attacks in OWASP Top Ten 2021. Loading files based on unvalidated user-input may cause file information disclosure and uploading files with unvalidated file types to an arbitrary directory may lead to Remote Command Execution (RCE). JFinal is a widely used Web + ORM framework, which has 1.4K forks and 3.2k stars on GitHub. Multiple CWEs have been submitted for File Path Injection attack associated with this framework. One sample CWE and its details can be found at Issue#115: ZrLog 2.2.2 Remote command execution vulnerability. Another one can be found at Issue #27: File reading. This query detects unsafe file loading/downloading operations in code repositories that consume this framework. Please consider to merge this PR. Thanks.

Open Graph Description: External Control of File Name or Path, also called File Path Injection, is a common attack and injection attack is listed as one of the top attacks in OWASP Top Ten 2021. Loading files based on unv...

X Description: External Control of File Name or Path, also called File Path Injection, is a common attack and injection attack is listed as one of the top attacks in OWASP Top Ten 2021. Loading files based on unv...

Opengraph URL: https://github.com/github/codeql/pull/7712

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ae2f1286-4f2a-993f-d624-b9a49016cd0b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id86F6:1DAD98:F31D8A:1590D89:6A4D2BDC
html-safe-nonceb775f419269e0965cd7f134a3d37dc4a193571c9f43a45d8951d49f81b455562
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkY2OjFEQUQ5ODpGMzFEOEE6MTU5MEQ4OTo2QTREMkJEQyIsInZpc2l0b3JfaWQiOiIyMTEzMzMxNjM3NTA4NzEzNDM3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacfaeac9032eccf356427e763b96d9936257ec976a5af13a85724799e7b635912b
hovercard-subject-tagpull_request:829806424
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/codeql/pull/7712/files
twitter:imagehttps://avatars.githubusercontent.com/u/37377780?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/37377780?s=400&v=4
og:image:altExternal Control of File Name or Path, also called File Path Injection, is a common attack and injection attack is listed as one of the top attacks in OWASP Top Ten 2021. Loading files based on unv...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codeql git https://github.com/github/codeql.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id143040428
octolytics-dimension-repository_nwogithub/codeql
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143040428
octolytics-dimension-repository_network_root_nwogithub/codeql
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release93f17a978ee60bc4668e1d7b90e6bd2d622261fd
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/7712/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F7712%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F7712%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fcodeql
Reloadhttps://github.com/github/codeql/pull/7712/files
Reloadhttps://github.com/github/codeql/pull/7712/files
Reloadhttps://github.com/github/codeql/pull/7712/files
Please reload this pagehttps://github.com/github/codeql/pull/7712/files
github https://github.com/github
codeqlhttps://github.com/github/codeql
Notifications https://github.com/login?return_to=%2Fgithub%2Fcodeql
Fork 2k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Star 9.8k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Code https://github.com/github/codeql
Issues 987 https://github.com/github/codeql/issues
Pull requests 424 https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security and quality 0 https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
Code https://github.com/github/codeql
Issues https://github.com/github/codeql/issues
Pull requests https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security and quality https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
atorralbahttps://github.com/atorralba
github:mainhttps://github.com/github/codeql/tree/main
luchua-bc:java/file-path-injectionhttps://github.com/luchua-bc/ql/tree/java/file-path-injection
Conversation 63 https://github.com/github/codeql/pull/7712
Findings https://github.com/github/codeql/pull/7712/findings
Commits 11 https://github.com/github/codeql/pull/7712/commits
Checks 0 https://github.com/github/codeql/pull/7712/checks
Files changed https://github.com/github/codeql/pull/7712/files
Please reload this pagehttps://github.com/github/codeql/pull/7712/files
Java: CWE-073 File path injection with the JFinal framework https://github.com/github/codeql/pull/7712/files#top
Show all changes 11 commits https://github.com/github/codeql/pull/7712/files
27043a0 File path injection with the JFinal framework luchua-bc Jan 23, 2022 https://github.com/github/codeql/pull/7712/commits/27043a09b3899f7da6335b3cfa1e788ae42ed90c
ff4826d Correct the data model and update qldoc luchua-bc Feb 8, 2022 https://github.com/github/codeql/pull/7712/commits/ff4826d20316d143c318020e54072bd1ca4cb97e
4609227 Use data model for request/session attribute operations luchua-bc Feb 9, 2022 https://github.com/github/codeql/pull/7712/commits/4609227e769385a026ebff2435ab270bd7ce5bb3
ce03aeb Fixed an issue related to normalized path luchua-bc Feb 9, 2022 https://github.com/github/codeql/pull/7712/commits/ce03aeb4d9cff7d35ae394d46d5b5360265bfabc
12c53ba Simplify the query luchua-bc Feb 11, 2022 https://github.com/github/codeql/pull/7712/commits/12c53baba4a4e85ded2ca6f4fb7d6465550bf868
e3d0e9f Update normalized path node luchua-bc Feb 11, 2022 https://github.com/github/codeql/pull/7712/commits/e3d0e9f083c01b590309615a16fd23543cc84257
78630f2 Match attribute name to reduce FP luchua-bc Feb 11, 2022 https://github.com/github/codeql/pull/7712/commits/78630f25dd8cfed0ccdca1c4afb49fb6fb0b74b8
35a9242 Model value passing between a setter and a getter call as a value step luchua-bc Feb 14, 2022 https://github.com/github/codeql/pull/7712/commits/35a924292bf739f248b34bf2fb7634fb6996c856
2b5982f Remove specified value step from additional taint step luchua-bc Feb 14, 2022 https://github.com/github/codeql/pull/7712/commits/2b5982fd9d777ac367797f06999a8cd3d33b847b
fd533f2 Remove the same callable constraint luchua-bc Feb 15, 2022 https://github.com/github/codeql/pull/7712/commits/fd533f2ba88eef6e93c6898d564a1ace66494cf7
40bf093 Move shared code to the lib folder and update qldoc luchua-bc Feb 15, 2022 https://github.com/github/codeql/pull/7712/commits/40bf093d34e7538b083bdd483bfff4ea8fde7f8c
Clear filters https://github.com/github/codeql/pull/7712/files
Please reload this pagehttps://github.com/github/codeql/pull/7712/files
Please reload this pagehttps://github.com/github/codeql/pull/7712/files
FilePathInjection.java https://github.com/github/codeql/pull/7712/files#diff-c01729d5a57523a323262ab68e2b6a7adf329555f83be8517e8a821877bf7856
FilePathInjection.qhelp https://github.com/github/codeql/pull/7712/files#diff-3d9c40d182499832eb881422d472038b6828b2acaa8da622d8b3443b0618291f
FilePathInjection.ql https://github.com/github/codeql/pull/7712/files#diff-c02a6766a60fca2fbf2da69dc2b2a0a40216d1eb43de0d1a136d7f3ed598df62
JFinalController.qll https://github.com/github/codeql/pull/7712/files#diff-8219b965ff5433db0d9304d63125ecfd9723781de929bffad786f24fba884280
PathSanitizer.qll https://github.com/github/codeql/pull/7712/files#diff-f3846afbdd0bbc98e81457eec11a54d240b071c9ba87d2feb22a15a18f1f2b23
FilePathInjection.expected https://github.com/github/codeql/pull/7712/files#diff-184a4a0726225d645a299cf38f7f7e27e2c8420507d2f06ebfd835486a8565fb
FilePathInjection.java https://github.com/github/codeql/pull/7712/files#diff-e81b5c63d05d9ad3b4f99655a64cc74277a94a1cbadefdc92655e9c5afc92724
FilePathInjection.qlref https://github.com/github/codeql/pull/7712/files#diff-09ae498e25c81377adb59bef6373764febdcdbf3cfc6022236d482aed5b9fbbc
options https://github.com/github/codeql/pull/7712/files#diff-f17d1d8f025b63c62a37e7633fd97a7b7c57b8f7908b36130e25fe91b28cc5e1
Controller.java https://github.com/github/codeql/pull/7712/files#diff-e0c825d6073ac56cf58a453b95cdc68ad330283f48c818450bc7a7132bc8b18e
Kv.java https://github.com/github/codeql/pull/7712/files#diff-395ad7f419a6a90920bb123061e6c5d0ac8a93bf17752920f7459f5dfa99d446
UploadFile.java https://github.com/github/codeql/pull/7712/files#diff-b69c4ea5de4c678d339027e82533520e7d571211f2e70e13c7a5c072256424c5
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.javahttps://github.com/github/codeql/pull/7712/files#diff-c01729d5a57523a323262ab68e2b6a7adf329555f83be8517e8a821877bf7856
View file https://github.com/luchua-bc/ql/blob/40bf093d34e7538b083bdd483bfff4ea8fde7f8c/java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/7712/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.qhelphttps://github.com/github/codeql/pull/7712/files#diff-3d9c40d182499832eb881422d472038b6828b2acaa8da622d8b3443b0618291f
View file https://github.com/luchua-bc/ql/blob/40bf093d34e7538b083bdd483bfff4ea8fde7f8c/java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.qhelp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/7712/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.qlhttps://github.com/github/codeql/pull/7712/files#diff-c02a6766a60fca2fbf2da69dc2b2a0a40216d1eb43de0d1a136d7f3ed598df62
View file https://github.com/luchua-bc/ql/blob/40bf093d34e7538b083bdd483bfff4ea8fde7f8c/java/ql/src/experimental/Security/CWE/CWE-073/FilePathInjection.ql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/7712/{{ revealButtonHref }}
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/src/experimental/Security/CWE/CWE-073/JFinalController.qllhttps://github.com/github/codeql/pull/7712/files#diff-8219b965ff5433db0d9304d63125ecfd9723781de929bffad786f24fba884280
View file https://github.com/luchua-bc/ql/blob/40bf093d34e7538b083bdd483bfff4ea8fde7f8c/java/ql/src/experimental/Security/CWE/CWE-073/JFinalController.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/7712/{{ revealButtonHref }}
Please reload this pagehttps://github.com/github/codeql/pull/7712/files
https://github.com/github/codeql/blob/main/CODEOWNERS#L16
java/ql/src/experimental/semmle/code/java/PathSanitizer.qllhttps://github.com/github/codeql/pull/7712/files#diff-f3846afbdd0bbc98e81457eec11a54d240b071c9ba87d2feb22a15a18f1f2b23
View file https://github.com/luchua-bc/ql/blob/40bf093d34e7538b083bdd483bfff4ea8fde7f8c/java/ql/src/experimental/semmle/code/java/PathSanitizer.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/7712/{{ revealButtonHref }}
Please reload this pagehttps://github.com/github/codeql/pull/7712/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.