Security advisory
SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination directory, i.e. `/home/user/dir.sh`. Because of the file name and destination directory constraints, the arbitrary file creation impact is limited and depends on the use case. Version 1.3.3 contains a patch for this vulnerability.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-32841
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:17 UTC · Revision 1
Source evidence
SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination directory, i.e. `/home/user/dir.sh`. Because of the file name and destination directory constraints, the arbitrary file creation impact is limited and depends on the use case. Version 1.3.3 contains a patch for this vulnerability.
osv:CVE-2021-32841
Complete source record
{
"id": "3bf4d7a87a49495d0b3389b31ba3a29b9f512036e1f696cb7735960a4effcb53",
"url": "https://osv.dev/vulnerability/CVE-2021-32841",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-32841",
"summary": "SharpZipLib (or #ziplib) is a Zip, GZip, Tar and BZip2 library. Starting version 1.3.0 and prior to version 1.3.3, a check was added if the destination file is under destination directory. However, it is not enforced that `destDir` ends with slash. If the `destDir` is not slash terminated like `/home/user/dir` it is possible to create a file with a name thats begins with the destination directory, i.e. `/home/user/dir.sh`. Because of the file name and destination directory constraints, the arbitrary file creation impact is limited and depends on the use case. Version 1.3.3 contains a patch for this vulnerability.",
"evidence": "osv:CVE-2021-32841",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-32841",
"aliases": [
"CVE-2021-32841",
"GHSA-2x7h-96h5-rq84"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/icsharpcode/sharpziplib",
"type": "GIT",
"events": [
{
"introduced": "8f7d89201afa13c814f9b3d1813884ffe0ec7025"
},
{
"fixed": "1b1ab013ce1df02d8f27cf582197759c614d9126"
},
{
"fixed": "5c3b293de5d65b108e7f2cd0ea8f81c1b8273f78"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:sharpziplib_project:sharpziplib:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "1.3.0"
},
{
"fixed": "1.3.3"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "5c3b293de5d65b108e7f2cd0ea8f81c1b8273f78"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "1b1ab013ce1df02d8f27cf582197759c614d9126"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v1.3.3"
}
]
}
}
],
"versions": [
"v1.3.2",
"v1.3.1",
"v1.3.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-32841.json"
}
}
],
"modified": "2026-10-20T10:53:46.304071934Z",
"provider": "osv",
"references": [
"https://github.com/icsharpcode/SharpZipLib/releases/tag/v1.3.3",
"https://github.com/icsharpcode/SharpZipLib/commit/5c3b293de5d65b108e7f2cd0ea8f81c1b8273f78",
"https://securitylab.github.com/advisories/GHSL-2021-125-sharpziplib/"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-32841",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 384605,
"published_at": "2022-01-26T22:15:07.837+00:00"
}