The vulnerability exists in how Hugo's virtual filesystem handles file lookups. Specifically, the RootMappingFs.statRoot function was using Stat which resolves symbolic links. This allowed a crafted symlink within a Hugo project's theme or content directory to point to and access arbitrary files on the filesystem, outside of the intended project directory. The vulnerability was exploitable through the resources.Get function in Hugo templates. The provided patch replaces the call to Stat with LstatIfPossible, which does not follow symlinks, and adds a check to explicitly reject symlinks. This ensures that any attempt to access a file via a symlink using resources.Get will fail, mitigating the vulnerability.