CVE-2021-30218

Source
https://cve.org/CVERecord?id=CVE-2021-30218
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-30218.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-30218
Downstream
Related
Published
2021-04-29T15:15:11.050Z
Modified
2026-03-10T23:33:57.342937Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

samurai 1.2 has a NULL pointer dereference in writefile() in util.c via a crafted build file.

References

Affected packages

Git / github.com/michaelforney/samurai

Affected ranges

Type
GIT
Repo
https://github.com/michaelforney/samurai
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Fixed
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "1.2"
        }
    ]
}

Affected versions

0.*
0.1
0.2
0.3
0.4
0.5
0.6
0.7
1.*
1.0
1.1
1.2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-30218.json"
vanir_signatures
[
    {
        "source": "https://github.com/michaelforney/samurai/commit/e84b6d99c85043fa1ba54851ee500540ec206918",
        "target": {
            "file": "util.c",
            "function": "writefile"
        },
        "deprecated": false,
        "id": "CVE-2021-30218-a59c9422",
        "digest": {
            "length": 371.0,
            "function_hash": "208479727932887472560017995287603309180"
        },
        "signature_version": "v1",
        "signature_type": "Function"
    },
    {
        "source": "https://github.com/michaelforney/samurai/commit/e84b6d99c85043fa1ba54851ee500540ec206918",
        "target": {
            "file": "util.c"
        },
        "deprecated": false,
        "id": "CVE-2021-30218-b4bc9159",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "81979215965542079586361518180416248158",
                "313316081933114147512047608084223636088",
                "292698495400644002514943506147566235223",
                "142674882540023490960305744839035336723"
            ]
        },
        "signature_version": "v1",
        "signature_type": "Line"
    }
]