{"id":161,"cve":"CVE-2014-1830","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2014-1830","cwe":"CWE-200: Exposure of Sensitive Information to an Unauthorized Actor","cwe_number":200,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/200","cvss_score":5,"published":"2014-10-15","owasp":"A05 Security Misconfiguration","odc":"Interface","cdc":"Incorrect Interface","category":"Information Leakage","subcategory":"Insecure Handling of Sensitive Data","scope":"Remote","impact":"Information Disclosure","summary":"Sensitive Information Exposure in Python Requests","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2014-1830\/","description":"Requests (aka python-requests) before 2.3.0 allows remote servers to obtain sensitive information by reading the Proxy-Authorization header in a redirected request.","solution":"Upgrade python-requests to version 2.3.0 or higher.","affected_component":"python-requests","fixed_by_upgrading":true,"vulnerable_code":"import SimpleHTTPServer\nimport SocketServer\n\nPORT = 8000\n\nHandler = SimpleHTTPServer.SimpleHTTPRequestHandler\n\nhttpd = SocketServer.TCPServer((\"\", PORT), Handler)\n\nprint(\"serving at port\", PORT)\nhttpd.serve_forever()","patched_code":"import http.server\nimport os\nimport socketserver\n\nPORT = 8000\n\nclass HTTPRequestHandler(http.server.SimpleHTTPRequestHandler):\n    def translate_path(self, path):\n        path = super().translate_path(path)\n        root = os.path.abspath(self.directory)\n        if not os.path.abspath(path).startswith(root):\n            raise Exception(\"Unauthorized access to {}\".format(path))\n        return path\n\nHandler = HTTPRequestHandler\n\nwith socketserver.TCPServer((\"\", PORT), Handler) as httpd:\n    print(\"serving at port\", PORT)\n    httpd.serve_forever()","payload_needed":false,"payload":null,"payload_status":"none","published_fix":[],"references":null}