{"answers":{"affected":"1 open source package ship an affected version, including diesel-async.","exploited":"There is no known exploitation of RUSTSEC-2026-0138 in the wild and no public exploit code.","fix":"Upgrade diesel-async to 0.9.0 or later.","what":"RUSTSEC-2026-0138 is a memory corruption vulnerability in diesel-async, published on 30 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for RUSTSEC-2026-0138 and fix it if it is affected.\n\nWhat it is: RUSTSEC-2026-0138 is a memory corruption vulnerability in diesel-async, published on 30 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of RUSTSEC-2026-0138 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- diesel-async (crates.io): affected from 0.0.0-0; fixed in 0.9.0\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/RUSTSEC-2026-0138/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0138/index.md)","id":"RUSTSEC-2026-0138","markdown":"https://insights.sbomify.com/RUSTSEC-2026-0138/index.md","name":"RUSTSEC-2026-0138","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Rust async MySQL library","requires_auth":"none","summary":"Unsound memory access in diesel-async allows attackers to potentially execute code or read sensitive data via crafted date/time inputs.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Diesel-async uses the mysql-async crate for interacting with Mysql compatible databases. This library already provides access to deserialized data for date/time releated types. Diesel-async then translated these deserialized data back to their serialized binary representation to hook into diesels desearialization framework.\n\nWhile serializing these data/time values again Diesel-async relied on a cast between the `MysqlTime` `#[repr(C)]` struct (defined by Diesel) and a byte array. As this cast exposes padding bytes contained in this struct, this is undefined behaviour.\n\nThis vulnerability affects any user deserializing date/time values using the Mysql backend and diesel-async.\n\nThis affects any usage of the following functions with a `AsyncMysqlConnection` provided by diesel-async:\n\n* `diesel::serialize::FromSql\u003cTimestamp, Mysql\u003e`\n* `diesel::serialize::FromSql\u003cTime, Mysql\u003e`\n* `diesel::serialize::FromSql\u003cDate, Mysql\u003e`\n* `diesel::serialize::FromSql\u003cDateTime, Mysql\u003e`\n\n## Mitigation\n\nThe preferred mitigation to the outlined problem is to update to Diesel-async version 0.9.0 or newer, which includes fixes for the problem.\n\n## Resolution\n\nDiesel-async now just calls a safe serialization method provided by Diesel 2.3.9 and newer","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Unsound access to padding bytes while serializing date/time values using the Mysql backend","id":"RUSTSEC-2026-0138","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["0.9.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"diesel-async","purl":"pkg:cargo/diesel-async","source":"RUSTSEC-2026-0138"}],"products":null,"published":"2026-04-30","related":[],"sources":[{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Unsound memory access in diesel-async allows attackers to potentially execute code or read sensitive data via crafted date/time inputs.","url":"https://insights.sbomify.com/RUSTSEC-2026-0138/"}