{"answers":{"affected":"2 open source packages ship an affected version, including aeson and text-iso8601.","exploited":"There is no known exploitation of HSEC-2026-0007 in the wild and no public exploit code.","fix":"Upgrade aeson to 2.2.5.1 or later.","what":"HSEC-2026-0007 is a denial of service vulnerability in aeson, published on 22 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for HSEC-2026-0007 and fix it if it is affected.\n\nWhat it is: HSEC-2026-0007 is a denial of service vulnerability in aeson, published on 22 May 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 HSEC-2026-0007 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- aeson (Hackage): affected from 0.12.0.0; fixed in 2.2.5.1\n- text-iso8601 (Hackage): affected from 0.1; fixed in 0.1.1.2\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/HSEC-2026-0007/ (Markdown: https://insights.sbomify.com/HSEC-2026-0007/index.md)","id":"HSEC-2026-0007","markdown":"https://insights.sbomify.com/HSEC-2026-0007/index.md","name":"HSEC-2026-0007","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Haskell JSON library","requires_auth":"none","summary":"Attackers can crash servers via memory exhaustion by sending crafted JSON with large negative exponents to applications using the aeson library.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"# Denial of Service and Memory Exhaustion in aeson\n\nA Denial of Service (DoS) and memory exhaustion vulnerability was identified in the `aeson` package. The vulnerability allows an attacker to exhaust server memory and crash the host process by supplying maliciously crafted JSON payloads.\n\nThe vulnerability exists in `aeson`'s `withBoundedScientific_` function (located in `src/Data/Aeson/Types/FromJSON.hs`). The exponent bounds check only rejects large positive exponents (`exp10 \u003e 1024`) but fails to reject arbitrarily large negative exponents.\n\nWhen an attacker sends a JSON number with a massive negative exponent (e.g., `1e-999999999`), the value bypasses the check and flows into `realToFrac`, which computes `fromRational . toRational`. For such a large negative exponent, `toRational` produces a GMP Integer with approximately 1 billion decimal digits, causing immediate and severe memory exhaustion.\n\nAffected `FromJSON` instances:\n\n* `Fixed a` (including `Centi`, `Pico`, `Nano`, etc.)\n* `NominalDiffTime`\n* `DiffTime`\n\n## Resolution\n\nThe issue was resolved by introducing proper bounds checks:\n\n- `aeson` now applies an absolute bounds check to both positive and negative exponents (`abs exp10 \u003e 1024`).\n\nThe fix first shipped in `aeson-2.3.0.0`, and have been backported to the previous release series as `aeson-2.2.5.1`.\n\nUsers are strongly advised to update to the patched versions:\n\n* `aeson-2.2.5.1` or later\n\n## Acknowledgements\n\nThe vulnerabilities were reported Nathan Walsh, and patched by Li-yao Xia.","ecosystems":["Hackage"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Denial of Service and Memory Exhaustion in aeson","id":"HSEC-2026-0007","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":null,"product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Hackage","fixed":["2.2.5.1"],"introduced":["0.12.0.0"],"last_affected":[],"package":"aeson","purl":"pkg:hackage/aeson","source":"HSEC-2026-0007"},{"ecosystem":"Hackage","fixed":["0.1.1.2"],"introduced":["0.1"],"last_affected":[],"package":"text-iso8601","purl":"pkg:hackage/text-iso8601","source":"HSEC-2026-0007"}],"products":null,"published":"2026-05-22","related":[],"sources":[{"class":"open","licence":"CC0 1.0","name":"Haskell Security Response Team","prefix":"HSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can crash servers via memory exhaustion by sending crafted JSON with large negative exponents to applications using the aeson library.","url":"https://insights.sbomify.com/HSEC-2026-0007/"}