Title: Arbitrary javascript injection(Security issue) · Issue #10325 · GoogleCloudPlatform/python-docs-samples · GitHub
Open Graph Title: Arbitrary javascript injection(Security issue) · Issue #10325 · GoogleCloudPlatform/python-docs-samples
X Title: Arbitrary javascript injection(Security issue) · Issue #10325 · GoogleCloudPlatform/python-docs-samples
Description: Multiple reflected XSS in the sample python applications of google cloud. Description In the main.py file under 'github.com/GoogleCloudPlatform/python-docs-samples/blob/main/appengine/standard_python3/bundled-services/mail/flask', the fl...
Open Graph Description: Multiple reflected XSS in the sample python applications of google cloud. Description In the main.py file under 'github.com/GoogleCloudPlatform/python-docs-samples/blob/main/appengine/standard_pyth...
X Description: Multiple reflected XSS in the sample python applications of google cloud. Description In the main.py file under 'github.com/GoogleCloudPlatform/python-docs-samples/blob/main/appengine/standard_...
Opengraph URL: https://github.com/GoogleCloudPlatform/python-docs-samples/issues/10325
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Arbitrary javascript injection(Security issue)","articleBody":"# Multiple reflected XSS in the sample python applications of google cloud.\r\n\r\n# Description\r\n\r\nIn the main.py file under 'github.com/GoogleCloudPlatform/python-docs-samples/blob/main/appengine/standard_python3/bundled-services/mail/flask', the flask application accepts user input and injects it to html body without any sanitisation.\r\n\r\n# Steps to reproduce\r\n\r\n1. Set up https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/appengine/standard_python3/bundled-services/mail/flask/main.py by following the proper steps.\r\n2. Run main.py after adding the listener ip and port at the end of main.py\r\n```\r\nif __name__ == \"__main__\":\r\n app.run(host=\"127.0.0.1\", port=8080, debug=True)\r\n```\r\n5. Go the web interface.\r\n6. Give a basic xss payload after closing the existing script tag as the input of the email field.\r\n\r\n```\r\n\u003c/script>\u003cscript>alert(1)\u003c/script>\r\n```\r\n\r\n7. In the main.py file wherever the address variable is called, script will be injected into the corresponding html, and the alert will pop up, even in the exception page.\r\n\r\n# POC\r\n\r\n\r\n\r\nThe below line of code is where I took the poc from.\r\nhttps://github.com/GoogleCloudPlatform/python-docs-samples/blob/68fa027b74e70ac14a6486cecea12ddb6af584f7/appengine/standard_python3/bundled-services/mail/flask/main.py#L68\r\n\r\nAll the places like wherever the {address} is called xss can happen, and if the {message} also takes input and is injected to html, that can also cause XSS\r\n\r\nI am reporting this here because it does not have an impact that requires me to report it to the vulnerability program. I found this while checking out google cloud, console, shell etc.","author":{"url":"https://github.com/retrymp3","@type":"Person","name":"retrymp3"},"datePublished":"2023-06-27T16:28:01Z","url":"https://github.com/GoogleCloudPlatform/python-docs-samples/issues/10325"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:647f717b-9456-628f-1a41-e13bf86ff29c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B508:317709:4D6DC4:620E92:6B035D36 |
| html-safe-nonce | 6e9e964212872696e35db91796101c072822dfe3f5319f24d1cefaee67d9bd1d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTA4OjMxNzcwOTo0RDZEQzQ6NjIwRTkyOjZCMDM1RDM2IiwidmlzaXRvcl9pZCI6IjgwOTk4NTM4ODAxNTE3Mjc0MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 38fdd89f9b81c1eadab627901e711d7ba6c490ae0d34c7e96a7a19cce0b1c97e |
| hovercard-subject-tag | issue:1777340542 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/GoogleCloudPlatform/python-docs-samples/10325/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a7d3793357d3ee05a193b5a5ddc0a877cca2469740c01f61caef137266b7e61c/GoogleCloudPlatform/python-docs-samples/issues/10325 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a7d3793357d3ee05a193b5a5ddc0a877cca2469740c01f61caef137266b7e61c/GoogleCloudPlatform/python-docs-samples/issues/10325 |
| og:image:alt | Multiple reflected XSS in the sample python applications of google cloud. Description In the main.py file under 'github.com/GoogleCloudPlatform/python-docs-samples/blob/main/appengine/standard_pyth... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | retrymp3 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/GoogleCloudPlatform/python-docs-samples git https://github.com/GoogleCloudPlatform/python-docs-samples.git |
| octolytics-dimension-user_id | 2810941 |
| octolytics-dimension-user_login | GoogleCloudPlatform |
| octolytics-dimension-repository_id | 35065876 |
| octolytics-dimension-repository_nwo | GoogleCloudPlatform/python-docs-samples |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 35065876 |
| octolytics-dimension-repository_network_root_nwo | GoogleCloudPlatform/python-docs-samples |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width