René's URL Explorer Experiment


Title: Medium severity CWE-79 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01598.java:51 (1 additional file changed) by appsecai-inte-tool[bot] · Pull Request #342 · AppSecureAI/BenchmarkJava100-public · GitHub

Open Graph Title: Medium severity CWE-79 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01598.java:51 (1 additional file changed) by appsecai-inte-tool[bot] · Pull Request #342 · AppSecureAI/BenchmarkJava100-public

X Title: Medium severity CWE-79 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01598.java:51 (1 additional file changed) by appsecai-inte-tool[bot] · Pull Request #342 · AppSecureAI/BenchmarkJava100-public

Description: Vulnerability Information AppSecAI Vulnerability ID: 6914fa3a28b9e848644fceb8 Vulnerability: Cross-Site Scripting CWE Classification: CWE-79 Severity: Medium File: src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01598.java Detection Rule: java.lang.security.audit.xss.no-direct-response-writer.no-direct-response-writer Description: Detected a request with potential user-input going into a OutputStream or Writer object. This bypasses any view or template environments, including HTML escaping, which may expose this application to cross-site scripting (XSS) vulnerabilities. Consider using a view technology such as JavaServer Faces (JSFs) which automatically escapes HTML views. Triage Analysis Status: Confirmed vulnerability Security Assessment: Severity: High Confidence: 100% Analysis User input from request.getParameterValues() flows through multiple transformations (StringBuilder operations, Base64 encode/decode, string splitting) but never undergoes HTML encoding. The value is written directly to response.getWriter() with Content-Type text/html. Base64 encoding is data transformation, not XSS sanitization. Line 52 explicitly disables browser XSS protection with X-XSS-Protection: 0. No context-appropriate encoding exists anywhere in the data flow from source (line 47) to sink (line 56). Recommended Remediation Apply HTML context encoding before writing to the response. Replace line 56 with: response.getWriter().write(Encode.forHtml(bar)); using OWASP Java Encoder library. Alternatively, use a templating engine with automatic escaping (JSP with JSTL's , Thymeleaf, etc.) instead of writing directly to the Writer. Remove the X-XSS-Protection: 0 header that disables browser protections. Remediation Details Fix Description: Perfect! The XSS vulnerability has been successfully fixed. Here's a summary of the changes: Changes Made 1. BenchmarkTest01598.java (src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01598.java) Added import: org.apache.commons.text.StringEscapeUtils (line 26) Fixed vulnerable line: Changed line 52 from: response.getWriter().write(bar); to: response.getWriter().write(StringEscapeUtils.escapeHtml4(bar)); 2. pom.xml Added dependency: Apache Commons Text 1.12.0 for HTML escaping functionality Bug Fix Explanation Fix Summary The code wrote user-controlled input directly to the HTTP response without HTML escaping, creating a Cross-Site Scripting (XSS) vulnerability. An attacker could inject malicious JavaScript by providing input like , which would execute in victims' browsers. Fixed by applying HTML entity encoding using StringEscapeUtils.escapeHtml4() before writing to the response. This converts dangerous characters (<, >, &, ", ') into their HTML entity equivalents (<, >, &, ", '), ensuring they render as text rather than executable code. This approach is secure because: Context-appropriate encoding: Uses HTML entity encoding specifically designed for HTML context Comprehensive protection: Escapes all characters with special meaning in HTML Industry-standard library: Apache Commons Text is a well-vetted, maintained security library Defense-in-depth: Works alongside other XSS protections (Content Security Policy, HTTP-only cookies) Minimal attack surface: Pure data transformation with no parsing or evaluation The fix maintains complete backward compatibility—legitimate content displays identically, while malicious payloads are neutralized. Migration Guidance Not applicable. This fix requires no manual steps: Maven automatically resolves the Apache Commons Text dependency during build The HTML escaping is transparent to application behavior No configuration changes, data migration, or API modifications required Deployment follows standard procedures (build and deploy the updated WAR file) Changes Made: Updated source code with secure implementation Updated 1 additional file (dependencies, configurations, etc.) 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: 6914fa3a28b9e848644fceb8 Vulnerability: Cross-Site Scripting CWE Classification: CWE-79 Severity: Medium File: src/main/java/org/owasp/benchmark...

X Description: Vulnerability Information AppSecAI Vulnerability ID: 6914fa3a28b9e848644fceb8 Vulnerability: Cross-Site Scripting CWE Classification: CWE-79 Severity: Medium File: src/main/java/org/owasp/benchmark...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:dc6ad45d-f123-32d7-2e93-d33b9a8e7ac2
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA020:29EF90:2158E9E:2C71D89:6A5D6CAF
html-safe-nonceb0549b4a635099af98f403c7008e1f4c84466a36001e6427d18e771e649b14a6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDIwOjI5RUY5MDoyMTU4RTlFOjJDNzFEODk6NkE1RDZDQUYiLCJ2aXNpdG9yX2lkIjoiMTU5NTcwNTI0NTYwMjUwNzk1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccb3aa124bdc29cf4446170bacb2e06081fba6dc65b55107559e58a3b4e94f9b7
hovercard-subject-tagpull_request:3004745667
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/342/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: 6914fa3a28b9e848644fceb8 Vulnerability: Cross-Site Scripting CWE Classification: CWE-79 Severity: Medium File: src/main/java/org/owasp/benchmark...
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 full-width
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/342/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FAppSecureAI%2FBenchmarkJava100-public%2Fpull%2F342%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%2F342%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/342/files
Reloadhttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files
Reloadhttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/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-79-20251113-000523-6914f9beec4f4ebf412a568e-6914fa3a28b9e848644fceb8https://github.com/AppSecureAI/BenchmarkJava100-public/tree/appsecureai-remediate-cwe-79-20251113-000523-6914f9beec4f4ebf412a568e-6914fa3a28b9e848644fceb8
Conversation 1 https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342
Commits 1 https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/commits
Checks 1 https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/checks
Files changed https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files
Medium severity CWE-79 vulnerability in src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01598.java:51 (1 additional file changed) https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files#top
Show all changes 1 commit https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files
db99e5b Fix medium severity CWE-79 vulnerability and update 1 additional file AppSecAIGit Nov 13, 2025 https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/commits/db99e5b9ab337189117811c06b70c55e1cb0569c
Clear filters https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files
Please reload this pagehttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files
pom.xml https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8
BenchmarkTest01598.java https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files#diff-c3d4f94f5a3a5b6b596aac2b9610b67bfd33b5ad3f9b5a3522bb921f8e9d0c8b
pom.xmlhttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8
View file https://github.com/AppSecureAI/BenchmarkJava100-public/blob/db99e5b9ab337189117811c06b70c55e1cb0569c/pom.xml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/{{ revealButtonHref }}
https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8
https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8
src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01598.javahttps://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files#diff-c3d4f94f5a3a5b6b596aac2b9610b67bfd33b5ad3f9b5a3522bb921f8e9d0c8b
View file https://github.com/AppSecureAI/BenchmarkJava100-public/blob/db99e5b9ab337189117811c06b70c55e1cb0569c/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01598.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/{{ revealButtonHref }}
https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files#diff-c3d4f94f5a3a5b6b596aac2b9610b67bfd33b5ad3f9b5a3522bb921f8e9d0c8b
https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files#diff-c3d4f94f5a3a5b6b596aac2b9610b67bfd33b5ad3f9b5a3522bb921f8e9d0c8b
https://github.com/AppSecureAI/BenchmarkJava100-public/pull/342/files#diff-c3d4f94f5a3a5b6b596aac2b9610b67bfd33b5ad3f9b5a3522bb921f8e9d0c8b
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.