{"answers":{"affected":"2 open source packages ship an affected version, including io.netty.incubator:netty-incubator-codec-bhttp. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-40642 in the wild and no public exploit code.","fix":"Upgrade io.netty.incubator:netty-incubator-codec-bhttp to 0.0.13.Final or later.","what":"CVE-2024-40642 is a high-severity vulnerability in netty-incubator-codec-ohttp, published on 18 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-40642 and fix it if it is affected.\n\nWhat it is: CVE-2024-40642 is a high-severity vulnerability in netty-incubator-codec-ohttp, published on 18 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-40642 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- io.netty.incubator:netty-incubator-codec-bhttp (Maven): affected all versions; fixed in 0.0.13.Final\n- io.netty.incubator:netty-incubator-codec-bhttp (Maven): affected all versions; fixed in 0.0.13.Final\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-40642/ (Markdown: https://insights.sbomify.com/CVE-2024-40642/index.md)","id":"CVE-2024-40642","markdown":"https://insights.sbomify.com/CVE-2024-40642/index.md","name":"CVE-2024-40642","record":{"aliases":["GHSA-q8f2-hxq5-cp4h"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Netty binary HTTP parser","requires_auth":"none","summary":"Attackers can exploit missing input validation in the Netty binary HTTP parser to perform injection attacks, request smuggling, and SSRF.","user_interaction":"not_required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"netty-incubator-codec-ohttp","vendor":"netty"}],"cvss":{"score":8.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"description":"The netty incubator codec.bhttp is a java language binary http parser. In affected versions the `BinaryHttpParser` class does not properly validate input values thus giving attackers almost complete control over the HTTP requests constructed from the parsed output. Attackers can abuse several issues individually to perform various injection attacks including HTTP request smuggling, desync attacks, HTTP header injections, request queue poisoning, caching attacks and Server Side Request Forgery (SSRF). Attacker could also combine several issues to create well-formed messages for other text-based protocols which may result in attacks beyond the HTTP protocol. The BinaryHttpParser class implements the readRequestHead method which performs most of the relevant parsing of the received request. The data structure prefixes values with a variable length integer value. The parsing code below first gets the lengths of the values from the prefixed variable length integer. After it has all of the lengths and calculates all of the indices, the parser casts the applicable slices of the ByteBuf to String. Finally, it passes these values into a new `DefaultBinaryHttpRequest` object where no further parsing or validation occurs. Method is partially validated while other values are not validated at all. Software that relies on netty to apply input validation for binary HTTP data may be vulnerable to various injection and protocol based attacks. This issue has been addressed in version 0.0.13.Final. Users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Absent Input Validation in BinaryHttpParser in the netty incubator codec.bhttp","id":"CVE-2024-40642","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"other","year":"2024"},"n_packages":2,"n_references":2,"next":{"headline":"Joplin has a parsing error leading to Cross-site Scripting (XSS)","id":"CVE-2024-40643"},"packages":[{"ecosystem":"Maven","fixed":["0.0.13.Final"],"introduced":["0"],"last_affected":[],"package":"io.netty.incubator:netty-incubator-codec-bhttp","purl":null,"source":"GHSA-q8f2-hxq5-cp4h"},{"ecosystem":"Maven","fixed":["0.0.13.Final"],"introduced":["0"],"last_affected":[],"package":"io.netty.incubator:netty-incubator-codec-bhttp","purl":"pkg:maven/io.netty.incubator/netty-incubator-codec-bhttp","source":"GHSA-q8f2-hxq5-cp4h"}],"prev":{"headline":"Unsigned code template execution through workflows in projectdiscovery/nuclei","id":"CVE-2024-40641"},"products":["netty-incubator-codec-ohttp"],"published":"2024-07-18","related":[{"cvss_score":6.9,"headline":"netty-incubator-codec-ohttp's HPKEContext operations may produce empty byte[] on failures","id":"CVE-2026-41207","kev_date_added":null,"published":"2026-06-04"},{"cvss_score":6.8,"headline":"netty-incubator-codec-ohttp's Incorrect Native Pointer Derivation in Pooled Direct ByteBuf Fallback Leads to Out-of-Bounds Native Memory Access","id":"CVE-2026-48040","kev_date_added":null,"published":"2026-06-04"},{"cvss_score":5.9,"headline":"netty-incubator-codec-ohttp's BoringSSLAEADContext Repeats Nonces","id":"CVE-2024-36121","kev_date_added":null,"published":"2024-06-04"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["netty"]},"summary":"Attackers can exploit missing input validation in the Netty binary HTTP parser to perform injection attacks, request smuggling, and SSRF.","url":"https://insights.sbomify.com/CVE-2024-40642/"}