VYPR
Unrated severityOSV Advisory· Published Mar 5, 2018· Updated Aug 5, 2024

CVE-2018-7663

CVE-2018-7663

Description

An issue was discovered in resources/views/layouts/app.blade.php in Voten.co before 2017-08-25. An unescaped template literal in the bio field of a user profile (resources/views/layouts/app.blade.php) allows for server-side template injection of arbitrary JavaScript.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

2
  • Voten Co/VotenOSV2 versions
    (expand)+ 1 more
    • (no CPE)
    • (no CPE)range: < 2017-08-25 (pre-commit)

Patches

Vulnerability mechanics

Root cause

"An unescaped template literal in the user's bio field allows for server-side template injection."

Attack vector

An attacker can inject arbitrary JavaScript into the bio field of a user profile. This script is then rendered unescaped within a template literal in the `app.blade.php` file, leading to server-side template injection. The vulnerability is triggered when the user's profile is displayed, causing the injected script to execute on the server.

Affected code

The vulnerability exists in the `resources/views/layouts/app.blade.php` file. Specifically, the line `bio: `{!! Auth::user()->bio !!}`,` is modified to `bio: '{!! strToHex(Auth::user()->bio) !!}',` in the patch.

What the fix does

The patch modifies the `app.blade.php` file by introducing a new helper function `strToHex`. This function converts the user's bio string to its hexadecimal representation, with each byte prefixed by '\x'. This ensures that any special characters or script tags within the bio are treated as literal hexadecimal values rather than executable code when rendered in the template literal, thus preventing template injection.

Preconditions

  • inputThe attacker must be able to control the content of the user's bio field.

Generated on Jun 2, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

2

News mentions

0

No linked articles in our index yet.