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

Connection_String_Injection @ /src/main/java/org/cysecurity/cspf/jvl/controller/Install.java #61

Open
ksalman-Cx opened this issue Jan 17, 2024 · 0 comments

Comments

@ksalman-Cx
Copy link

ksalman-Cx commented Jan 17, 2024

Checkmarx (SAST): Connection_String_Injection
Security Issue: Read More about Connection_String_Injection
Applications: Kelseys-repos, All Projects, SCA examples, JVL
Checkmarx Project: ksalman-Cx-org-NA-kelsey-na/JavaVulnerableLab-base
Repository URL: https://github.com/ksalman-Cx-org-NA-kelsey-na/JavaVulnerableLab-base
Branch: master
Scan ID: 579aec21-676f-40f9-bdda-e11a607b1c21


The application's setup method receives untrusted, user-controlled data, and uses this data to connect to a database using dburl, at line 112 of /src/main/java/org/cysecurity/cspf/jvl/controller/Install.java. This may enable a Connection String Injection attack.

The attacker can inject the connection string via user input, ""dburl"", which is retrieved by the application in the processRequest method, at line 54 of /src/main/java/org/cysecurity/cspf/jvl/controller/Install.java.

Result #1:
Severity: HIGH
State: CONFIRMED
Status: RECURRENT
Attack Vector:

    1. ""dburl"": /src/main/java/org/cysecurity/cspf/jvl/controller/Install.java[54,38]
    2. getParameter: /src/main/java/org/cysecurity/cspf/jvl/controller/Install.java[54,37]
    3. dburl: /src/main/java/org/cysecurity/cspf/jvl/controller/Install.java[54,9]
    4. setup: /src/main/java/org/cysecurity/cspf/jvl/controller/Install.java[87,21]
    5. dburl: /src/main/java/org/cysecurity/cspf/jvl/controller/Install.java[112,65]
    Review result in Checkmarx One: Connection_String_Injection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant