CVE-2024-45306

Source
https://cve.org/CVERecord?id=CVE-2024-45306
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-45306.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-45306
Aliases
  • GHSA-wxf9-c5gx-qrwr
Downstream
BELL (1)
CGA (2)
DEBIAN (1)
SUSE (4)
Related
Published
2024-09-02T16:35:17Z
Modified
2026-10-21T08:55:01Z
Severity
  • 4.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L CVSS Calculator
Summary
heap-buffer-overflow in Vim
Details

Vim is an open source, command line text editor. Patch v9.1.0038 optimized how the cursor position is calculated and removed a loop, that verified that the cursor position always points inside a line and does not become invalid by pointing beyond the end of a line. Back then we assumed this loop is unnecessary. However, this change made it possible that the cursor position stays invalid and points beyond the end of a line, which would eventually cause a heap-buffer-overflow when trying to access the line pointer at the specified cursor position. It's not quite clear yet, what can lead to this situation that the cursor points to an invalid position. That's why patch v9.1.0707 does not include a test case. The only observed impact has been a program crash. This issue has been addressed in with the patch v9.1.0707. All users are advised to upgrade.

Database specific
{
    "cna_assigner":  "GitHub_M",
    "cwe_ids":  [
        "CWE-122"
    ],
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/45xxx/CVE-2024-45306.json"
}
References

Affected packages

Git / github.com/vim/vim

Affected ranges

Type
GIT
Repo
https://github.com/vim/vim
Events
Database specific
Show details
{
    "extracted_events":  [
        {
            "cpe":  "cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*",
            "range":  [
                {
                    "introduced":  "9.1.0038"
                },
                {
                    "fixed":  "9.1.0707"
                }
            ],
            "source":  "CPE_RANGE"
        },
        {
            "range":  [
                {
                    "fixed":  "396fd1ec2956307755392a1"
                }
            ],
            "source":  "REFERENCES_COMMIT"
        },
        {
            "original_tag":  "v9.1.0038",
            "range":  [
                {
                    "fixed":  "4ea37f88e8345ca830271636a2e197a1a46114d2"
                }
            ],
            "source":  "REFERENCES_TAG"
        }
    ]
}

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-45306.json"
vanir_signatures
[
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "146200493773228420153804765641940418619",
                "181033856548463723269076532187372962110",
                "147283946000592477997225859273763607496",
                "50266576772208305944356452914840253409"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2024-45306-3c551490",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/vim/vim/commit/396fd1ec2956307755392a1c61f55d5c1847f308",
        "target":  {
            "file":  "src/version.c"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "79470412697282440550641894270691578005",
            "length":  2519
        },
        "id":  "CVE-2024-45306-6dc526b1",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/vim/vim/commit/396fd1ec2956307755392a1c61f55d5c1847f308",
        "target":  {
            "file":  "src/charset.c",
            "function":  "getvcol"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "90665343969047594015070038739342269698",
                "87068687747345546323758440833822524848",
                "47468587028101994744928300794501835293"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2024-45306-87c15c30",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/vim/vim/commit/396fd1ec2956307755392a1c61f55d5c1847f308",
        "target":  {
            "file":  "src/charset.c"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "330921513726365027784229712511119475278",
            "length":  2699
        },
        "id":  "CVE-2024-45306-d24b52bf",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/vim/vim/commit/4ea37f88e8345ca830271636a2e197a1a46114d2",
        "target":  {
            "file":  "src/charset.c",
            "function":  "getvcol"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "304517552156741098406395580056716173166",
                "102560607318291704273149532129175417722",
                "73773060656838104514410879597836329654",
                "88710469434087905717198096368684937058",
                "88665069223589384665419684106529950832",
                "276635969792884969521132041419796823318",
                "177971658226366967765910738653719422881",
                "153882034344255727595824453580587316539",
                "83286795917948818087782901230010035044",
                "138242204509995700788687260124099654817",
                "290135236312601685719716527887005804152",
                "127513620914689551359870067264419583361",
                "14751191394932634780220278116214597376",
                "68300189346812553890603838585941311631",
                "21594082634074818222334434703714792127",
                "11970495729344950399189933115416668198",
                "252553057407657912312701899722723440597",
                "38568770114002875026835583810960413632",
                "209945671308487113701324926795419801403",
                "63018891488115134738751404692743152318",
                "150511331990141175437195584612331229284",
                "235809128391977849995433587398545662066",
                "4979043070032799191869485210662621940",
                "279921070057914395951111217071818481990",
                "7794253460078205269671978740210682380",
                "19975374830982909152835537366808409248",
                "219711591732300085143794293946790301554",
                "182909186972879281140363527737941674096",
                "47869732631331538356365978190896598671",
                "64430286854331592412267504365883484335",
                "15955425650645363690577252046610353765",
                "255781107639769325014233432540942683594",
                "207632671454651796969785799840905643419",
                "243617457736470344699967502120864349768",
                "289263440626580164643145574920030205044",
                "127363157444821326515929059702732515868"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2024-45306-f197a910",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/vim/vim/commit/4ea37f88e8345ca830271636a2e197a1a46114d2",
        "target":  {
            "file":  "src/charset.c"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "146200493773228420153804765641940418619",
                "32899963800678332217225701168931658643",
                "308356523736454741248745775121467520649",
                "255589407687059121031993638776656770377"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2024-45306-f7196a98",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/vim/vim/commit/4ea37f88e8345ca830271636a2e197a1a46114d2",
        "target":  {
            "file":  "src/version.c"
        }
    }
]
vanir_signatures_modified
"2026-10-21T08:55:01Z"