René's URL Explorer Experiment


Title: Medium severity CWE-78 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01673.java:82 by appsecai-inte-tool[bot] · Pull Request #346 · AppSecureAI/BenchmarkJava100-public · GitHub

Open Graph Title: Medium severity CWE-78 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01673.java:82 by appsecai-inte-tool[bot] · Pull Request #346 · AppSecureAI/BenchmarkJava100-public

X Title: Medium severity CWE-78 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01673.java:82 by appsecai-inte-tool[bot] · Pull Request #346 · AppSecureAI/BenchmarkJava100-public

Description: Vulnerability Information AppSecAI Vulnerability ID: 6914fa3a28b9e848644fcebc Vulnerability: Command Injection CWE Classification: CWE-78 Severity: Medium File: src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01673.java Detection Rule: java.lang.security.audit.tainted-cmd-from-http-request.tainted-cmd-from-http-request Description: Detected input from a HTTPServletRequest going into a 'ProcessBuilder' or 'exec' command. This could lead to command injection if variables passed into the exec commands are not properly sanitized. Instead, avoid using these OS commands with user-supplied input, or, if you must use these commands, use a whitelist of specific values. Triage Analysis Status: Confirmed vulnerability Security Assessment: Severity: Critical Confidence: 98% Analysis Command injection vulnerability exists due to unsanitized user input concatenated into shell command string passed to 'sh -c' or 'cmd.exe /c'. User input flows from query parameter 'BenchmarkTest01673' → param → bar → concatenated as 'echo ' + bar. While ProcessBuilder uses array arguments, the '-c' flag causes the shell to interpret the entire string, enabling shell metacharacter exploitation (e.g., ';', '|', '$()'). No input validation or sanitization applied in doSomething() method. Recommended Remediation Replace shell invocation pattern with direct echo command: argList.add('echo'); argList.add(bar); This treats user input as data rather than executable shell syntax. Alternatively, if shell features are required, implement strict input validation with regex allowlist (e.g., ^[a-zA-Z0-9_-]+$) and reject any input containing shell metacharacters. Remediation Details Fix Description: Fix Summary The command injection vulnerability has been fixed by adding input sanitization before the user-controlled variable is used in the shell command. The code concatenated user input directly into a command string executed by a shell interpreter (via -c option), allowing attackers to inject arbitrary commands using shell metacharacters like ;, |, $, etc. The fix implements a whitelist approach using regex to strip out all shell metacharacters, allowing only alphanumeric characters, whitespace, periods, underscores, and hyphens. This prevents command injection while preserving the intended functionality of echoing the input value. Security rationale: The vulnerability existed because user input from the query string flowed through param → bar and was concatenated into "echo " + bar before being passed to a shell with the -c option. The -c option causes the shell to interpret the entire string as executable commands, so an input like test; rm -rf / would execute both the echo and the destructive rm command. By sanitizing the input with replaceAll("[^a-zA-Z0-9\\s._-]", ""), all dangerous shell metacharacters are removed before command construction, eliminating the injection vector. Changes Made: Updated source code with secure implementation This PR was generated automatically to address a security vulnerability. Please review the changes carefully before merging.

Open Graph Description: Vulnerability Information AppSecAI Vulnerability ID: 6914fa3a28b9e848644fcebc Vulnerability: Command Injection CWE Classification: CWE-78 Severity: Medium File: src/main/java/org/owasp/benchmark/te...

X Description: Vulnerability Information AppSecAI Vulnerability ID: 6914fa3a28b9e848644fcebc Vulnerability: Command Injection CWE Classification: CWE-78 Severity: Medium File: src/main/java/org/owasp/benchmark/te...

Opengraph URL: https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:65b71677-39b6-72a6-5801-8a9aa1c1e555
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8C18:169995:93D4C9:C831A4:6A5CDFA1
html-safe-nonce5a2429c52b9a42c9e5c6f52531ce7add3a7f3af61d7d3366a33ffbda4c6f8be5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzE4OjE2OTk5NTo5M0Q0Qzk6QzgzMUE0OjZBNUNERkExIiwidmlzaXRvcl9pZCI6IjE1NzA3Mjg4Mjg1NDA1OTkzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac896aa09e388407b7e6829603fe83ce4bf9d47f8d7b6371305ffc27b1a3266a3b
hovercard-subject-tagpull_request:3004753727
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/AppSecureAI/BenchmarkJava100-public/pull/346/files
twitter:imagehttps://avatars.githubusercontent.com/u/148882153?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/148882153?s=400&v=4
og:image:altVulnerability Information AppSecAI Vulnerability ID: 6914fa3a28b9e848644fcebc Vulnerability: Command Injection CWE Classification: CWE-78 Severity: Medium File: src/main/java/org/owasp/benchmark/te...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/AppSecureAI/BenchmarkJava100-public git https://github.com/AppSecureAI/BenchmarkJava100-public.git
octolytics-dimension-user_id148882153
octolytics-dimension-user_loginAppSecureAI
octolytics-dimension-repository_id1095020699
octolytics-dimension-repository_nwoAppSecureAI/BenchmarkJava100-public
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1095020699
octolytics-dimension-repository_network_root_nwoAppSecureAI/BenchmarkJava100-public
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FAppSecureAI%2FBenchmarkJava100-public%2Fpull%2F346%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/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/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/enterprise/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%2FAppSecureAI%2FBenchmarkJava100-public%2Fpull%2F346%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=AppSecureAI%2FBenchmarkJava100-public
Reloadhttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files
Reloadhttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files
Reloadhttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files
AppSecureAI https://github.com/AppSecureAI
BenchmarkJava100-publichttps://github.com/AppSecureAI/BenchmarkJava100-public
Notifications https://github.com/login?return_to=%2FAppSecureAI%2FBenchmarkJava100-public
Fork 10 https://github.com/login?return_to=%2FAppSecureAI%2FBenchmarkJava100-public
Star 1 https://github.com/login?return_to=%2FAppSecureAI%2FBenchmarkJava100-public
Code https://github.com/AppSecureAI/BenchmarkJava100-public
Issues 0 https://github.com/AppSecureAI/BenchmarkJava100-public/issues
Pull requests 145 https://github.com/AppSecureAI/BenchmarkJava100-public/pulls
Actions https://github.com/AppSecureAI/BenchmarkJava100-public/actions
Projects https://github.com/AppSecureAI/BenchmarkJava100-public/projects
Security and quality 0 https://github.com/AppSecureAI/BenchmarkJava100-public/security
Insights https://github.com/AppSecureAI/BenchmarkJava100-public/pulse
Code https://github.com/AppSecureAI/BenchmarkJava100-public
Issues https://github.com/AppSecureAI/BenchmarkJava100-public/issues
Pull requests https://github.com/AppSecureAI/BenchmarkJava100-public/pulls
Actions https://github.com/AppSecureAI/BenchmarkJava100-public/actions
Projects https://github.com/AppSecureAI/BenchmarkJava100-public/projects
Security and quality https://github.com/AppSecureAI/BenchmarkJava100-public/security
Insights https://github.com/AppSecureAI/BenchmarkJava100-public/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FAppSecureAI%2FBenchmarkJava100-public%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FAppSecureAI%2FBenchmarkJava100-public%2Fissues%2Fnew%2Fchoose
appsecai-inte-toolhttps://github.com/apps/appsecai-inte-tool
mainhttps://github.com/AppSecureAI/BenchmarkJava100-public/tree/main
appsecureai-remediate-cwe-78-20251113-000837-6914f9beec4f4ebf412a568e-6914fa3a28b9e848644fcebchttps://github.com/AppSecureAI/BenchmarkJava100-public/tree/appsecureai-remediate-cwe-78-20251113-000837-6914f9beec4f4ebf412a568e-6914fa3a28b9e848644fcebc
Conversation 1 https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346
Commits 1 https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/commits
Checks 1 https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/checks
Files changed https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files
Medium severity CWE-78 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01673.java:82 https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files#top
Show all changes 1 commit https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files
4750811 Fix medium severity CWE-78 vulnerability AppSecAIGit Nov 13, 2025 https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/commits/4750811f9106c17915fcd8585b05776ed7745cb7
Clear filters https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files
src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01673.javahttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files#diff-c9547db6b69691adfbb29b527600494d07ed1c6db5ab2bbcfb74e5b76e7800b1
View file https://github.com/AppSecureAI/BenchmarkJava100-public/blob/4750811f9106c17915fcd8585b05776ed7745cb7/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01673.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/{{ revealButtonHref }}
https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files#diff-c9547db6b69691adfbb29b527600494d07ed1c6db5ab2bbcfb74e5b76e7800b1
https://github.com/AppSecureAI/BenchmarkJava100-public/pull/346/files#diff-c9547db6b69691adfbb29b527600494d07ed1c6db5ab2bbcfb74e5b76e7800b1
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.