Skip to content

[Security] Unable to extract files from nupkg when different file name encoding is used #2816

Closed

Description

@gep13

Impact

When extracting the contents of a Chocolatey package (a .nupkg file), depending on the encoding of the file name, Chocolatey is not able to understand about the existence of the file. This causes a problem in terms of how Chocolatey interrogates the contents of a file in order to send a file for scanning (via VirusTotal), as well as performing other functions on the file.

This means that there is the potential for a malicious file to be included within the nupkg file, and for Chocolatey not to be aware of the problem.

This issue stems from a change in the way that the underlying NuGet libraries handle the encoding of file names when they are added to the nupkg file. We need to make NuGet.Core aware of the all the known ways to encode the file name, so that it can correctly handle the extraction of all files contained within the nupkg file.

Patches

A fix for this problem has been released in version 2.11.0.20220901 of the customised version of NuGet.Core which is maintained by the Chocolatey Team.

Workarounds

There are no known workaround to this problem.

References

N/A

Activity

  1. added this to the 1.2.0 milestone on Sep 15, 2022
  2. added a commit that references this issue on Oct 14, 2022
  3. added
    SecurityIssues that are related to security vulnerabilities, or other security related problems.
    4 - DoneCode has been added to the repository, and has been reviewed by a team member.
    on Oct 19, 2022
  4. added 2 commits that reference this issue on Oct 19, 2022
  5. added
    5 - ReleasedThe issue has been resolved, and released to the public for consumption.
    and removed
    4 - DoneCode has been added to the repository, and has been reviewed by a team member.
    on Oct 20, 2022
  6. AdmiringWorm commented on Oct 20, 2022

    @AdmiringWorm
    Member

    🎉 This issue has been resolved in version 1.2.0 🎉

    The release is available on:

    Your GitReleaseManager bot 📦🚀

  7. changed the title [-]TBD[/-] [+][Security] Unable to extract files from nupkg when different file name encoding is used[/+] on Oct 20, 2022
  8. added
    EnhancementIssues that introduce new functionality to the project, or enhances/updates existing functionality.
    on Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

5 - ReleasedThe issue has been resolved, and released to the public for consumption.EnhancementIssues that introduce new functionality to the project, or enhances/updates existing functionality.SecurityIssues that are related to security vulnerabilities, or other security related problems.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions