{"id":"CVE-2026-54610","summary":"LibreDWG: const-input mutation and crash in bit_TV_to_utf8 error handling","details":"LibreDWG is a free C library to read and write DWG files. Prior to 0.14, `bit_TV_to_utf8()` in `src/bits.c` can write to the caller-provided `src` buffer despite accepting const input. On an `iconv()` error other than `E2BIG`, the function frees its output buffer and passes the original input alias to `bit_u_expand()`, which expands or shrinks Unicode and multibyte escape sequences in place. If the input is a string literal, read-only mapping, or other immutable buffer, the write can cause a segmentation fault and denial of service; mutable caller-owned input can be unexpectedly modified before being returned. This affects applications that expose the conversion API to untrusted input under those conditions. Direct file-triggered exploitability through normal DWG decode/export paths remains unconfirmed because many TV strings are heap allocated by bit_read_TV(). This issue is fixed in version 0.14.","aliases":["GHSA-5p98-8245-6hxq"],"modified":"2026-11-06T01:07:16.851373836Z","published":"2026-10-30T20:39:19.805Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-471","CWE-703"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54610.json"},"references":[{"type":"WEB","url":"https://github.com/LibreDWG/libredwg/releases/tag/0.14"},{"type":"WEB","url":"https://github.com/user-attachments/files/28631091/libredwg-bit-tv-to-utf8-submission.tar.gz"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54610.json"},{"type":"ADVISORY","url":"https://github.com/LibreDWG/libredwg/security/advisories/GHSA-5p98-8245-6hxq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54610"},{"type":"FIX","url":"https://github.com/LibreDWG/libredwg/commit/08c034a224a4e9512b1cd62e74b5cf081a4cfa89"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/libredwg/libredwg","events":[{"introduced":"0"},{"fixed":"d9468ae948b8f07a08efa756c19f8916052358c0"},{"fixed":"08c034a224a4e9512b1cd62e74b5cf081a4cfa89"}],"database_specific":{"extracted_events":[{"strategy":"StringRangeExpression","range":[{"introduced":"0"},{"fixed":"0.14"}],"source":"AFFECTED_FIELD"},{"range":[{"fixed":"08c034a224a4e9512b1cd62e74b5cf081a4cfa89"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"d9468ae948b8f07a08efa756c19f8916052358c0"}],"source":"REFERENCES_TAG","original_tag":"0.14"}]}}],"versions":["0.13.4.8043","0.13.4.8036","0.13.4.8028","0.13.4.8018","0.13.4.8014","0.13.4.8001","0.13.4.7998","0.13.4.7985","0.13.4.7976","0.13.4.7974","0.13.4.7969","0.13.4","0.13.3.7819","0.13.3.7816","0.13.3.7813","0.13.3.7812","0.13.3.7810","0.13.3.7808","0.13.3.7805","0.13.3.7802","0.13.3.7797","0.13.3.7794","0.13.3.7792","0.13.3.7789","0.13.3.7778","0.13.3.7776","0.13.3.7772","0.13.3.7763","0.13.3.7761","0.13.3.7752","0.13.3.7743","0.13.3.7741","0.13.3.7737","0.13.3.7730","0.13.3.7727","0.13.3.7721","0.13.3.7715","0.13.3.7702","0.13.3.7696","0.13.3.7690","0.13.3.7686","0.13.3.7685","0.13.3.7680","0.13.3.7675","0.13.3.7665","0.13.3.7663","0.13.3.7657","0.13.3.7650","0.13.3.7649","0.13.3.7646","0.13.3.7640","0.13.3.7637","0.13.3.7635","0.13.3.7603","0.13.3.7600","0.13.3.7599","0.13.3.7582","0.13.3.7577","0.13.3.7574","0.13.3.7571","0.13.3.7562","0.13.3.7558","0.13.3.7557","0.13.3.7554","0.13.3.7552","0.13.3.7551","0.13.3.7545","0.13.3.7539","0.13.3.7535","0.13.3.7534","0.13.3.7533","0.13.3.7516","0.13.3.7507","0.13.3.7501","0.13.3.7491","0.13.3.7483","0.13.3.7473","0.13.3.7472","0.13.3.7469","0.13.3.7466","0.13.3.7460","0.13.3.7456","0.13.3.7453","0.13.3.7445","0.13.3.7442","0.13.3.7437","0.13.3.7434","0.13.3.7431","0.13.3.7429","0.13.3.7426","0.13.3.7424","0.13.3.7420","0.13.3.7414","0.13.3.7412","0.13.3.7411","0.13.3.7409","0.13.3.7405","0.13.3.7385","0.13.3.7377","0.13.3.7371","0.13.3.7351","0.13.3.7345","0.13.3.7344","0.13.3.7341","0.13.3.7338","0.13.3.7327","0.13.3.7324","0.13.3.7320","0.13.3.7308","0.13.3.7306","0.13.3.7298","0.13.3.7273","0.13.3.7270","0.13.3.7268","0.13.3.7265","0.13.3.7264","0.13.3.7262","0.13.3.7259","0.13.3.7257","0.13.3.7251","0.13.3.7246","0.13.3.7240","0.13.3.7233","0.13.3.7227","0.13.3.7226","0.13.3.7225","0.13.3.7224","0.13.3.7223","0.13.3.7220","0.13.3.7217","0.13.3.7199","0.13.3.7190","0.13.3.7187","0.13.3.7186","0.13.3.7183","0.13.3.7176","0.13.3.7168","0.13.3.7166","0.13.3.7165","0.13.3.7163","0.13.3","0.13.2","0.13.1","0.13","0.12.5","0.12.4","0.12.3","0.12.2","0.12.1","0.12","0.11.1","0.11","0.10.1","0.10","0.9.3","0.9.2","0.9.1","0.9","0.8","0.7","0.6.2","0.6.1","0.6","0.5","0.4.938","0.4.924","0.4.900","0.4-dev","0.3"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-54610.json","vanir_signatures":[{"target":{"file":"test/unit-testing/bits_test.c"},"deprecated":false,"digest":{"line_hashes":["293137356731622066556877633854742637156","231678867723397022834309974498116934722","17442317707626315525578220058940740363","321599853359259168687857455384773127678"],"threshold":0.9},"id":"CVE-2026-54610-91789807","signature_type":"Line","signature_version":"v1","source":"https://github.com/libredwg/libredwg/commit/08c034a224a4e9512b1cd62e74b5cf081a4cfa89"},{"digest":{"threshold":0.9,"line_hashes":["49767515012856523006609786846141487675","51767973309089573731138741627418469522","214988644504213162965813640952238262990","244819296756283961456692824590706746832","27844949856869863672095217557809784032","77896253088770974522687231449032865388","109656386444620635452392358778299269116","296031323750994905362176623140475984053","106201200356465986227145837673662370733","30256074524972750250787441305293718266","173369055911681301747166990024197824583","143621292742105292688096803105989929264","65876926228280999514100252927459455022","85392031684084465774002464460570711921","249238180479009043757627070605456909292","195222699048597012469761422123501115447"]},"id":"CVE-2026-54610-9d8b7cb7","signature_type":"Line","signature_version":"v1","source":"https://github.com/libredwg/libredwg/commit/d9468ae948b8f07a08efa756c19f8916052358c0","target":{"file":"src/encode.c"},"deprecated":false},{"id":"CVE-2026-54610-c336e4cb","signature_type":"Function","signature_version":"v1","source":"https://github.com/libredwg/libredwg/commit/08c034a224a4e9512b1cd62e74b5cf081a4cfa89","target":{"function":"bit_TV_to_utf8","file":"src/bits.c"},"deprecated":false,"digest":{"function_hash":"10813542448790680273373546484464815423","length":2861}},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/libredwg/libredwg/commit/08c034a224a4e9512b1cd62e74b5cf081a4cfa89","target":{"file":"test/unit-testing/bits_test.c","function":"bit_TV_to_utf8_tests"},"deprecated":false,"digest":{"function_hash":"205448059214177513386528010526781960739","length":4212},"id":"CVE-2026-54610-cd3762f3"},{"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["154512130852018455397856659198690717106","51876481842413898283512797170439118054","174184467050061406361915063095242200094","72521053116087091797231805787808258915","294587100473962440125218262153547687185","291013262779701407238566580163244165335","286715408555221545764630641579777262070","188660135417106434958253696063144996382","251312105046776457484298978991698236668","95784509257409776765300152242340662557","173539188606416070312364628183834824913","249782971859245451613310168160955920048","226235201698424972492719238058069981173"]},"id":"CVE-2026-54610-d1ac7042","signature_type":"Line","signature_version":"v1","source":"https://github.com/libredwg/libredwg/commit/d9468ae948b8f07a08efa756c19f8916052358c0","target":{"file":"examples/dwgfuzz.c"}},{"signature_version":"v1","source":"https://github.com/libredwg/libredwg/commit/d9468ae948b8f07a08efa756c19f8916052358c0","target":{"file":"examples/dwgfuzz.c","function":"main"},"deprecated":false,"digest":{"function_hash":"268448865954434003822748246748691671176","length":5110},"id":"CVE-2026-54610-d6d3b436","signature_type":"Function"},{"deprecated":false,"digest":{"line_hashes":["162773922008385008706031675107279741894","35023749800502067195827127243807592839","265467041267159437968536726616473268306","214933531990376774146959880066153321588"],"threshold":0.9},"id":"CVE-2026-54610-e0ecad4e","signature_type":"Line","signature_version":"v1","source":"https://github.com/libredwg/libredwg/commit/08c034a224a4e9512b1cd62e74b5cf081a4cfa89","target":{"file":"src/bits.c"}}],"vanir_signatures_modified":"2026-11-06T01:07:16Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L"}]}