{"answers":{"affected":"2 open source packages ship an affected version, including Bunkum. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-45814 in the wild and no public exploit code.","fix":"Upgrade Bunkum to 4.2.1 or later.","what":"CVE-2023-45814 is a medium-severity use after free vulnerability in LittleBigRefresh Bunkum, published on 18 Oct 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-45814 and fix it if it is affected.\n\nWhat it is: CVE-2023-45814 is a medium-severity use after free vulnerability in LittleBigRefresh Bunkum, published on 18 Oct 2023. 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-2023-45814 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- Bunkum (NuGet): affected from 4.0.0; fixed in 4.2.1\n- Bunkum (NuGet): affected from 4.0.0; fixed in 4.2.1\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-2023-45814/ (Markdown: https://insights.sbomify.com/CVE-2023-45814/index.md)","id":"CVE-2023-45814","markdown":"https://insights.sbomify.com/CVE-2023-45814/index.md","name":"CVE-2023-45814","record":{"aliases":["GHSA-jrf2-h5j6-3rrq"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass","other"],"network_reachable":"yes","non_default_config":false,"product_category":"Bunkum game server library","requires_auth":"none","summary":"Cached authentication tokens persist beyond request lifetime, allowing potential reuse of expired or detached tokens in Bunkum game server libraries.","user_interaction":"not_required","vuln_class":"use_after_free"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"bunkum","vendor":"littlebigfresh"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-772","name":"Missing Release of Resource after Effective Lifetime"}],"description":"Bunkum is an open-source protocol-agnostic request server for custom game servers. First, a little bit of background. So, in the beginning, Bunkum's `AuthenticationService` only supported injecting `IUser`s. However, as Refresh and SoundShapesServer implemented permissions systems support for injecting `IToken`s into endpoints was added. All was well until 4.0. Bunkum 4.0 then changed to enforce relations between `IToken`s and `IUser`s. This wasn't implemented in a very good way in the `AuthenticationService`, and ended up breaking caching in such a way that cached tokens would persist after the lifetime of the request - since we tried to cache both tokens and users. From that point until now, from what I understand, Bunkum was attempting to use that cached token at the start of the next request once cached. Naturally, when that token expired, downstream projects like Refresh would remove the object from Realm - and cause the object in the cache to be in a detached state, causing an exception from invalid use of `IToken.User`. So in other words, a use-after-free since Realm can't manage the lifetime of the cached token. Security-wise, the scope is fairly limited, can only be pulled off on a couple endpoints given a few conditions, and you can't guarantee which token you're going to get. Also, the token *would* get invalidated properly if the endpoint had either a `IToken` usage or a `IUser` usage. The fix is to just wipe the token cache after the request was handled, which is now in `4.2.1`. Users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":["NuGet"],"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":"Tokens cached in the AuthenticationService are susceptible to reuse in Bunkum","id":"CVE-2023-45814","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"NuGet","product":null,"products":[],"type":"use_after_free","year":"2023"},"n_packages":2,"n_references":2,"next":{"headline":"Viewing wget extractor output while logged in as an admin allows archived JS to execute in the admins context","id":"CVE-2023-45815"},"packages":[{"ecosystem":"NuGet","fixed":["4.2.1"],"introduced":["4.0.0"],"last_affected":[],"package":"Bunkum","purl":null,"source":"GHSA-jrf2-h5j6-3rrq"},{"ecosystem":"NuGet","fixed":["4.2.1"],"introduced":["4.0.0"],"last_affected":[],"package":"Bunkum","purl":"pkg:nuget/Bunkum","source":"GHSA-jrf2-h5j6-3rrq"}],"prev":{"headline":"Inefficient Regular Expression Complexity in TorBot","id":"CVE-2023-45813"},"products":["Bunkum"],"published":"2023-10-18","related":[],"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":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-09-13","vendors":["LittleBigRefresh"]},"summary":"Cached authentication tokens persist beyond request lifetime, allowing potential reuse of expired or detached tokens in Bunkum game server libraries.","url":"https://insights.sbomify.com/CVE-2023-45814/"}