René's URL Explorer Experiment


Title: Medium severity CWE-89 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02534.java:55 by appsecai-app[bot] · Pull Request #134 · AppSecureAI/BenchmarkJava100-ProdEval · GitHub

Open Graph Title: Medium severity CWE-89 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02534.java:55 by appsecai-app[bot] · Pull Request #134 · AppSecureAI/BenchmarkJava100-ProdEval

X Title: Medium severity CWE-89 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02534.java:55 by appsecai-app[bot] · Pull Request #134 · AppSecureAI/BenchmarkJava100-ProdEval

Description: Vulnerability Information AppSecAI Vulnerability ID: 69654fbefc355c4beda09b6f Vulnerability: SQL Injection CWE Classification: CWE-89 Severity: Medium File: src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02534.java Detection Rule: java.lang.security.audit.sqli.tainted-sql-from-http-request.tainted-sql-from-http-request Description: Detected input from a HTTPServletRequest going into a SQL sink or statement. This could lead to SQL injection if variables in the SQL statement are not properly sanitized. Use parameterized SQL queries or properly sanitize user input instead. Triage Analysis Status: Confirmed vulnerability Security Assessment: Severity: High Confidence: 98% Analysis The code contains a classic SQL injection vulnerability at line 55. User input from request.getParameterValues() flows through doSomething() (which performs no sanitization) into the 'bar' variable, which is then directly concatenated into the SQL query string: "SELECT * from USERS where USERNAME=? and PASSWORD='" + bar + "'". While the code uses PreparedStatement (good practice), it defeats the protection by constructing the SQL string with concatenation BEFORE passing it to prepareStatement(). The parameterized placeholder (?) only protects the USERNAME field; the PASSWORD field uses unsafe string concatenation. An attacker can inject SQL via the bar variable (e.g., input "' OR '1'='1" would bypass authentication). The security guideline about SeparateClassRequest.getTheValue returning sanitized values is irrelevant here since this code uses request.getParameterValues() directly. Recommended Remediation Replace string concatenation with proper parameterization. Change line 55 to: "SELECT * from USERS where USERNAME=? and PASSWORD=?" and add statement.setString(2, bar); after line 64 to bind the bar variable as a parameter instead of concatenating it into the SQL string. Remediation Details Fix Description: Summary Fixed the SQL injection vulnerability in BenchmarkTest02534.java by replacing string concatenation with parameterized queries. Changes Made: Line 50: Changed SQL query from "SELECT * from USERS where USERNAME=? and PASSWORD='" + bar + "'" to "SELECT * from USERS where USERNAME=? and PASSWORD=?" Line 62: Added statement.setString(2, bar); to bind the PASSWORD parameter bug_fix_explanation: The code concatenated user input (bar) directly into the SQL query for the PASSWORD field, creating a SQL injection vulnerability. An attacker could manipulate the bar variable to inject malicious SQL commands (e.g., ' OR '1'='1 to bypass authentication or '; DROP TABLE USERS; -- to execute destructive operations). Fixed by converting the PASSWORD field to use a parameterized query placeholder (?) and binding the user input via statement.setString(2, bar). Parameterized queries treat user input as data rather than executable SQL code, preventing injection attacks. The JDBC driver automatically escapes special characters and ensures the input is safely incorporated into the query. This approach is secure and maintainable because it leverages the database driver's built-in protection mechanisms and follows OWASP recommendations for preventing SQL injection vulnerabilities. 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: 69654fbefc355c4beda09b6f Vulnerability: SQL Injection CWE Classification: CWE-89 Severity: Medium File: src/main/java/org/owasp/benchmark/testco...

X Description: Vulnerability Information AppSecAI Vulnerability ID: 69654fbefc355c4beda09b6f Vulnerability: SQL Injection CWE Classification: CWE-89 Severity: Medium File: src/main/java/org/owasp/benchmark/testco...

Opengraph URL: https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:2bf7941e-eca7-74a2-b5e4-70705c690b13
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA41A:2658D0:6D666B:93AE62:6A5CD266
html-safe-nonce060f302ff6f896aea9db35863e338b0ac5fd65c44b4f019947d0867a4f45e899
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDFBOjI2NThEMDo2RDY2NkI6OTNBRTYyOjZBNUNEMjY2IiwidmlzaXRvcl9pZCI6IjE1Nzc2NTE2MTc0MzAzODQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac30b11512e3645547279fbceaea0b15b2df90af7c6829661987920c44482c807c
hovercard-subject-tagpull_request:3167380384
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-ProdEval/pull/134/files
twitter:imagehttps://avatars.githubusercontent.com/in/2416777?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/2416777?s=400&v=4
og:image:altVulnerability Information AppSecAI Vulnerability ID: 69654fbefc355c4beda09b6f Vulnerability: SQL Injection CWE Classification: CWE-89 Severity: Medium File: src/main/java/org/owasp/benchmark/testco...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/AppSecureAI/BenchmarkJava100-ProdEval git https://github.com/AppSecureAI/BenchmarkJava100-ProdEval.git
octolytics-dimension-user_id148882153
octolytics-dimension-user_loginAppSecureAI
octolytics-dimension-repository_id1132931500
octolytics-dimension-repository_nwoAppSecureAI/BenchmarkJava100-ProdEval
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id1095020699
octolytics-dimension-repository_parent_nwoAppSecureAI/BenchmarkJava100-public
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-ProdEval/pull/134/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FAppSecureAI%2FBenchmarkJava100-ProdEval%2Fpull%2F134%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-ProdEval%2Fpull%2F134%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-ProdEval
Reloadhttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files
Reloadhttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files
Reloadhttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files
AppSecureAI https://github.com/AppSecureAI
BenchmarkJava100-ProdEvalhttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval
AppSecureAI/BenchmarkJava100-publichttps://github.com/AppSecureAI/BenchmarkJava100-public
Notifications https://github.com/login?return_to=%2FAppSecureAI%2FBenchmarkJava100-ProdEval
Fork 1 https://github.com/login?return_to=%2FAppSecureAI%2FBenchmarkJava100-ProdEval
Star 0 https://github.com/login?return_to=%2FAppSecureAI%2FBenchmarkJava100-ProdEval
Code https://github.com/AppSecureAI/BenchmarkJava100-ProdEval
Pull requests 119 https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pulls
Actions https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/actions
Projects https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/projects
Security and quality 0 https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/security
Insights https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pulse
Code https://github.com/AppSecureAI/BenchmarkJava100-ProdEval
Pull requests https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pulls
Actions https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/actions
Projects https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/projects
Security and quality https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/security
Insights https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FAppSecureAI%2FBenchmarkJava100-ProdEval%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-ProdEval%2Fissues%2Fnew%2Fchoose
appsecai-apphttps://github.com/apps/appsecai-app
mainhttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval/tree/main
appsecureai-remediate-cwe-89-20260112-212848-69654f3ea0669069355e9d57-69654fbefc355c4beda09b6fhttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval/tree/appsecureai-remediate-cwe-89-20260112-212848-69654f3ea0669069355e9d57-69654fbefc355c4beda09b6f
Conversation 0 https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134
Commits 1 https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/commits
Checks 1 https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/checks
Files changed https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files
Medium severity CWE-89 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02534.java:55 https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files#top
Show all changes 1 commit https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files
91a7d21 Fix medium severity CWE-89 vulnerability AppSecAIGit Jan 12, 2026 https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/commits/91a7d2110bd996f29ff7c12e3ea2380667d35511
Clear filters https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files
src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02534.javahttps://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files#diff-b0dda53a4a8bd314a8fa90f2575a0f725d5140ad1dd41579d9f34a69da35e9c1
View file https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/blob/91a7d2110bd996f29ff7c12e3ea2380667d35511/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02534.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/{{ revealButtonHref }}
https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files#diff-b0dda53a4a8bd314a8fa90f2575a0f725d5140ad1dd41579d9f34a69da35e9c1
https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files#diff-b0dda53a4a8bd314a8fa90f2575a0f725d5140ad1dd41579d9f34a69da35e9c1
https://github.com/AppSecureAI/BenchmarkJava100-ProdEval/pull/134/files#diff-b0dda53a4a8bd314a8fa90f2575a0f725d5140ad1dd41579d9f34a69da35e9c1
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.