The vulnerability, identified as GHSA-vmf3-w455-68vh, is a tar parser interpretation differential in the node-tar library. The root cause is that the library incorrectly applies PAX extended header overrides, specifically the size attribute, to intermediary metadata headers instead of just to the subsequent file entry. This allows an attacker to create a specially crafted tar archive that is parsed differently by node-tar compared to other standard tar implementations like GNU tar or libarchive.
The flaw is located in the decode method of the Header class in src/header.ts. The constructor of the Header class calls this decode method. The vulnerable code unconditionally applied any size value from a PAX header (ex or gex) to the next header block, regardless of its type. The patch introduced a check to ensure that these overrides are only applied to normal filesystem entries and not to metadata headers (like L for long-name or x for PAX headers themselves).
By exploiting this, an attacker can desynchronize the parser, effectively hiding files within the archive from tools that use node-tar. This can be used to bypass security scanners or to cause denial-of-service conditions. The vulnerable function is Header.constructor, as it is the entry point to the flawed decoding logic. Any user of the node-tar library that parses untrusted tar files (e.g., using tar.list() or tar.extract()) would be affected.