DISCLAIMER: The CVE listed in the example is just for example purpose and might not be related to the package.
Usage example:
$ go run ./main.go -cvefile ./cves.txt -json | jq
{
"Golang": [
{
"id": "CVE-2021-28038",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-28038",
"score": 6.5,
"severity": "Medium",
"package": "Golang",
"description": "An issue was discovered in the Linux kernel through 5.11.3, as used with Xen PV. A certain part of the netback driver lacks necessary treatment of errors such as failed memory allocations (as a result of changes to the handling of grant mapping errors). A host OS denial of service may occur during misbehavior of a networking frontend driver. NOTE: this issue exists because of an incomplete fix for CVE-2021-26931."
}
],
"Linux": [
{
"id": "CVE-2020-25683",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-25683",
"score": 5.9,
"severity": "Medium",
"package": "Linux",
"description": "A flaw was found in dnsmasq before version 2.83. A heap-based buffer overflow was discovered in dnsmasq when DNSSEC is enabled and before it validates the received DNS entries. A remote attacker, who can create valid DNS replies, could use this flaw to cause an overflow in a heap-allocated memory. This flaw is caused by the lack of length checks in rfc1035.c:extract_name(), which could be abused to make the code execute memcpy() with a negative size in get_rdata() and cause a crash in dnsmasq, resulting in a denial of service. The highest threat from this vulnerability is to system availability."
},
{
"id": "CVE-2021-27365",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-27365",
"score": 7.8,
"severity": "High",
"package": "Linux",
"description": "An issue was discovered in the Linux kernel through 5.11.3. Certain iSCSI data structures do not have appropriate length constraints or checks, and can exceed the PAGE_SIZE value. An unprivileged user can send a Netlink message that is associated with iSCSI, and has a length up to the maximum length of a Netlink message."
}
],
"systemd": [
{
"id": "CVE-2021-27364",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-27364",
"score": 7.1,
"severity": "High",
"package": "systemd",
"description": "An issue was discovered in the Linux kernel through 5.11.3. drivers/scsi/scsi_transport_iscsi.c is adversely affected by the ability of an unprivileged user to craft Netlink messages."
},
{
"id": "CVE-2021-27363",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-27363",
"score": 4.4,
"severity": "Medium",
"package": "systemd",
"description": "An issue was discovered in the Linux kernel through 5.11.3. A kernel pointer leak can be used to determine the address of the iscsi_transport structure. When an iSCSI transport is registered with the iSCSI subsystem, the transport's handle is available to unprivileged users via the sysfs file system, at /sys/class/iscsi_transport/$TRANSPORT_NAME/handle. When read, the show_transport_handle function (in drivers/scsi/scsi_transport_iscsi.c) is called, which leaks the handle. This handle is actually the pointer to an iscsi_transport struct in the kernel module's global variables."
}
]
}$ go run ./main.go -cvefile ./cves.txt -md
* Golang
* [CVE-2021-28038](https://nvd.nist.gov/vuln/detail/CVE-2021-28038) CVSSv3 score: 6.5(Medium)
An issue was discovered in the Linux kernel through 5.11.3, as used with Xen PV. A certain part of the netback driver lacks necessary treatment of errors such as failed memory allocations (as a result of changes to the handling of grant mapping errors). A host OS denial of service may occur during misbehavior of a networking frontend driver. NOTE: this issue exists because of an incomplete fix for CVE-2021-26931.
* Linux
* [CVE-2020-25683](https://nvd.nist.gov/vuln/detail/CVE-2020-25683) CVSSv3 score: 5.9(Medium)
A flaw was found in dnsmasq before version 2.83. A heap-based buffer overflow was discovered in dnsmasq when DNSSEC is enabled and before it validates the received DNS entries. A remote attacker, who can create valid DNS replies, could use this flaw to cause an overflow in a heap-allocated memory. This flaw is caused by the lack of length checks in rfc1035.c:extract_name(), which could be abused to make the code execute memcpy() with a negative size in get_rdata() and cause a crash in dnsmasq, resulting in a denial of service. The highest threat from this vulnerability is to system availability.
* [CVE-2021-27365](https://nvd.nist.gov/vuln/detail/CVE-2021-27365) CVSSv3 score: 7.8(High)
An issue was discovered in the Linux kernel through 5.11.3. Certain iSCSI data structures do not have appropriate length constraints or checks, and can exceed the PAGE_SIZE value. An unprivileged user can send a Netlink message that is associated with iSCSI, and has a length up to the maximum length of a Netlink message.
* systemd
* [CVE-2021-27364](https://nvd.nist.gov/vuln/detail/CVE-2021-27364) CVSSv3 score: 7.1(High)
An issue was discovered in the Linux kernel through 5.11.3. drivers/scsi/scsi_transport_iscsi.c is adversely affected by the ability of an unprivileged user to craft Netlink messages.
* [CVE-2021-27363](https://nvd.nist.gov/vuln/detail/CVE-2021-27363) CVSSv3 score: 4.4(Medium)
An issue was discovered in the Linux kernel through 5.11.3. A kernel pointer leak can be used to determine the address of the iscsi_transport structure. When an iSCSI transport is registered with the iSCSI subsystem, the transport's handle is available to unprivileged users via the sysfs file system, at /sys/class/iscsi_transport/$TRANSPORT_NAME/handle. When read, the show_transport_handle function (in drivers/scsi/scsi_transport_iscsi.c) is called, which leaks the handle. This handle is actually the pointer to an iscsi_transport struct in the kernel module's global variables.$ go run ./main.go -cvefile ./cves.txt -md > /tmp/hello.md && pandoc --from=markdown --to=docx /tmp/hello.md -o /tmp/hello.docx