VDB
Sign up
MEDIUM6.5

GHSA-526j-582w-7fm9

Python Social Auth: Login CSRF in LINE backend (LineOAuth2) — missing OAuth state validation (incomplete fix of 5.0.0 campaign)

Quick fix

GHSA-526j-582w-7fm9 — social-auth-core: upgrade to the fixed version with the command below.

pip install --upgrade 'social-auth-core>=5.0.2'

Details

### Impact

Applications using the LINE Login backend are vulnerable to login CSRF / forced authentication. An attacker can start a LINE authorization flow for an account they control and trick a victim into visiting the callback URL with the attacker’s authorization code. Because the LINE backend did not validate the returned OAuth state, the application could accept the forged callback and log the victim in as the attacker-controlled LINE account.

If account linking is enabled, the same flaw can allow an attacker to link their LINE identity to a victim’s existing authenticated account, creating a persistent unauthorized login path.

### Patches * https://github.com/python-social-auth/social-core/pull/1829

### Workarounds Only applications that enable the LINE backend are affected.

### Credits

Thanks to Ta Duc Thien and Duc Anh Nguyen for reproting this via GitHub.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/social-auth-core
Introduced in: 0Fixed in: 5.0.2
Fixpip install --upgrade 'social-auth-core>=5.0.2'

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:pypi/social-auth-core"]}'