Skip to main content

Semgrep trophy case

This is a list of vulnerabilities found and security fixes made with Semgrep. Add yours with a pull request!

CVESemgrep ruleAffected softwareDescription < v0.5.5An unintended require vulnerability in <v0.5.5 larvitbase-api may allow an attacker to load arbitrary non-production code (JavaScript file). < 2.5.0An unintended require and server-side request forgery vulnerabilities in jsreport version 2.5.0 and earlier allow attackers to execute arbitrary code. < 0.8.6An unintended require vulnerability in script-manager npm package version 0.8.6 and earlier may allow attackers to execute arbitrary code. affects all versions of package phantomjs-seo. It is possible for an attacker to craft a URL that will be passed to a PhantomJS instance allowing for an SSRF attack. affects all versions of package node-pdf-generator. Due to lack of user input validation and sanitization done to the content given to node-pdf-generator, it is possible for an attacker to craft a URL that will be passed to an external server allowing an SSRF attack. affects all versions of package osm-static-maps. User input given to the package is passed directly to a template without escaping ({{{ ... }}}). As such, it is possible for an attacker to inject arbitrary HTML/JS code and depending on the context. It will be outputted as an HTML on the page which gives opportunity for XSS or rendered on the server (puppeteer) which also gives opportunity for SSRF and Local File Read.
Open Source Contributions
Affected softwareSemgrep ruleDescription
Open certifcation is disabled in order to accept self-signed certificates.
RPyCpython.lang.correctness.common-mistakes.default-mutable-dictIn python, the default values of function parameters are instantiated at function definition time. All calls to that function that use the default value all point to the same global object. Because of this, two instances of Server (initialized without passing in a protocol_config option) actually share the same protocol_config. So modifying one server's config affects the other ones.
CMakepython.lang.correctness.common-mistakes.default-mutable-dictConvertMSBuildXMLToJSON: Fix python mutable default data structure the host parameter to your jinja template in lis_person_name_full comes from request.form.get('lis_person_name_full'). This line may be susceptible to XSS attacks. I went ahead and html-escaped the lis_person_name_full variable in launch.htm.j2 file using the {{ value|e }} pattern in Jinja. ( Note that if your template file extensions ended with .html, .htm, .xml, or .xhtml, they would have been automatically html escaped. | safe filter from from_url in the userprefs.html template causes XSS.
pdfcpugo.lang.correctness.useless-eqeq.eqeq-is-badIt looks like this test case in pkg/pdfcpu/image_test.go was intending to compare bb1 with bb2, but it was comparing bb1 twice.

Not finding what you need in this doc? Ask questions in our Community Slack group, or see Support for other ways to get help.